This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two short scripts for Cygwin-Windows interoperation

Rex Godby wrote:
Two tiny Cygwin shell scripts may be of use. Each script has a single active line, which I include here (to try these from the command line, of course replace $1 with your desired argument):

1. To quickly find files and directories in "My Documents" and Desktop (down to a certain depth):

find "/cygdrive/c/Documents and Settings/$USER/Desktop" \
"/cygdrive/c/Documents and Settings/$USER/My Documents" \
-maxdepth 3 | grep "$1"
My desktop is empty and I keep nothing under C:\Documents and Settings nor "My Documents". In fact I've hacked them out of my registry. I have C:\Home\$USER (known to Cygwin as ~$USER) and no "My Documents" anywhere. And again, my desktop has nothing on it.
2. To open an Explorer window in a specified directory (given in Cygwin style), or to open a document in the proper Windows application:

/cygdrive/c/WINDOWS/explorer `cygpath -w "$1"`
They're are lots of methods for this. Indeed simply type "explorer ." works! Need it shorter "alias e=explorer" then "e ."!


Andrew DeFaria <>
Just for today, I will not sit in my living room all day in my underwear. Instead, I will move my computer into the bedroom.

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]