X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Two short scripts for Cygwin-Windows interoperation Date: Thu, 4 Jan 2007 14:01:05 -0500 Message-ID: <31DDB7BE4BF41D4888D41709C476B657041695C3@NIHCESMLBX5.nih.gov> In-Reply-To: A From: "Buchbinder, Barry \(NIH/NIAID\) [E]" To: "Rex Godby" , X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l04J1RNi004394 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 #!/bin/bash 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: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/