| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| 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<loom.20070104T172439-137@post.gmane.org> |
| From: | "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder AT niaid DOT nih DOT gov> |
| To: | "Rex Godby" <rwg3 AT york DOT ac DOT uk>, <cygwin AT cygwin DOT com> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |