delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Subject: | RE: space in dir name |
Date: | Mon, 18 Dec 2006 22:11:52 -0500 |
Message-ID: | <31DDB7BE4BF41D4888D41709C476B657041694FC@NIHCESMLBX5.nih.gov> |
In-Reply-To: | <20061219020647.8D535194EAF@spaceymail-a1.dreamhost.com> |
From: | "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder AT niaid DOT nih DOT gov> |
To: | "Sunil Ravipati" <sunil AT blingsoftware DOT com>, <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 kBJ3C77s020568 |
Sunil Ravipati wrote > I am a newbie. I installed cygwin on winXP. In the bash shell, > I want to access Program Files by cd Program Files but I get > is cd Program\ Files/ . > > How do i get rid off the slashes for the dir names with spaces. Don't get rid of them. The slash on the end of Files/ is harmless. cd will ignore it. I find it useful*. With it, I do not need to type the slash when cd'ing into a subdirectory of Program Files/. But if you must get rid of it, the "mark-directories" directive of readline or bash is probably what you want. See man bash or man readline. The back slash on the end of Program\ is essential. The backslash escapes the space so bash thinks that Program Files is a single argument. If you get rid of it, you must put either single or double quotes around the argument: "Program Files" or 'Program Files'. (If you are familiar with file/directory completion in cmd.exe, it puts double quotes to accomplish the same thing.) (*I find cmd.exe's lack of adding a trailing backslash a major annoyance.) - 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 |