RE: Spaces in file names


Subject: RE: Spaces in file names
From: Michalowski Thierry (Thierry.Michalowski@edipresse.ch)
Date: Mon Jul 17 2000 - 11:51:28 EDT


The "trick" is to tell your shell not to interpret the spaces as separaors
between arguments. This is called "escaping" the character.
You can do it in many ways:
-enclose within double-quotes : cd "my directory"
 This allows for variable interpolation within the quotes
-enclose within simple-quotes : cd 'my directory"
 This disallows variable interpolation within the quotes, making it easier
if you happen to have a "$" sign in the name
-escape the character with \ before it: cd my\ directory .
 The \ sign only escape one single character at a time, whereas the quotes
escape everything that is enclosed.
This (putting a \) is the way bash or tcsh will complete your command line
if you try typing the beginning of the name then the tabulation key.

HTH
Thierry

-----Original Message-----
From: Reed Loefgren [mailto:reedloefgren@interfold.com]
Sent: Monday, July 17, 2000 3:48 PM
To: netatalk-admins@umich.edu
Subject: Spaces in file names

Hi all,

  I serve my Mac files from a linuxppc server. If, while at a linux box,
I go into the server to the Mac files' directory the proper directory
and file names are displayed; including spaces in those names. How can I
"cd" into one of those directories? Do I have to go to the Mac and
remove spaces from names to make them accessible to Linux?
  I've already tried cd [word][option-spacebar for "hard space"][word],
but this isn't accepted by bash. What's the trick, or is it just not
do-able?

Thanks,

Reed

-- 
XI. The more you spend,
    The more you save.



This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 14:31:30 EST