Two short scripts for Cygwin-Windows interoperation

Buchbinder, Barry (NIH/NIAID) [E]
Thu Jan 4 19:01:00 GMT 2007

Rex Godby wrote on Thursday, January 04, 2007 11:54 AM:

> 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"
> 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"`

As long as we're at it:

	/c> cat /usr/local/bin/explore
	cygstart --explore "${1:-.}"

This opens Windows Explorer in the directory specified on the command
line, or in the current directory if no directory is specified.

- Barry
  -  Disclaimer: Statements made herein are not made on behalf of NIAID.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list