 |
 |
filenames with spaces
|
 |
|
 |
|
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status:
Offline
|
|
OK, I'm not completely stupid. I've used both unix and mac systems for years. What is the deal with filenames in OSX that have spaces in them. UNIX traditionally doesn't allow/like them. MacOS has. If you try to do many UNIX terminal commands with a filename that has spaces in it, you get "too many arguments" because it starts looking for the next parameter after a filename or other argument. Is there a default character that OSX is using to map to the spaces? I've tried a couple, like "_" but they don't work. Any thoughts?
|
|
|
| |
|
|
|
 |
|
 |
|
kimball
|
|
Use \ to replace spaces:
i.e.
l Desktop\ DB
(edited cuz i read the man page!)
[This message has been edited by kimball (edited 10-14-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Vail, CO
Status:
Offline
|
|
2 ways around:
1) '?' is the wild card for *any* character, and sh and csh will allow it for spaces.
2) Use the 'tcsh' shell and use quotes(ie: more "files with space.txt").
BTW - with tcsh, if you hit tab while typing any command in your path or any file in the current directory, it will finish it for you, including spaces if you started with a quote("). Pretty cool.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2000
Status:
Offline
|
|
Kimbal almost got it right. You use the "escape" \ to "escape" charters that the shell interprets for control. So for the space you have \ and for ? you have \? and for * you have \*. No need for two of them.
Read the man page for your shell to get the details.
Did I mention that it's all in the man page for the shell?
>man tcsh
>man csh
>man ksh
>man sh
Read the man page. Read the man page.
[This message has been edited by Scott_H (edited 10-14-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
The other way to do this is to put the filename in quotes, as in "Desktop DB". I don't know how you handle this for a filename that happens to have spaces and quote marks in it already, but I'd also imagine I just haven't run into that yet.
As far as I know, while Unix may not like wierd characters in filenames the only one you're technically forbidden from having in a filename is a foreslash, since that's the one it uses for directories.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |