On Fri, Feb 19, 2010 at 11:16 PM, Dos-Man 64 <[email protected]> wrote: > Does traditional Unix allow spaces in file names?
Yes. IIRC, the only character you cannot have in a name is the forward slash. Spaces, newlines, backspaces, tabs, etc. are all valid filename characters. However, I couldn't find a man page to confirm this. > What is the best way to deal with these kinds of file names? You need to "escape" the special characters or use quotes (single or double). For example: $ cp "MY DATA.TXT" "MY DATA.BAK" $ cp 'MY DATA.TXT' 'MY DATA.BAK' $ cp MY\ DATA.TXT MY\ DATA.BAK $ to="MY DATA.TXT" ; from="MY DATA.BAK" $ cp "$to" "$from" Good luck and let us know how things go. Regards, - Robert -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup
