In shell you will have to type
my\ file\ with\ spaces.txt

the back slash have to be added front of each space

On Sat, Feb 20, 2010 at 1:16 AM, Dos-Man 64 <[email protected]> wrote:
> I've had some trouble trying to perform general shell commands like cp
> and mv on file names that contain spaces.
>
> Let's say for example I have a file named  MY DATA.TXT.
>
> Now let's say I want to create a backup copy of it.
>
>  cp MY DATA.TXT  MY DATA.BAK
>
> Well, I don't think that worked, presumably because the shell thought
> MY and DATA.TXT represented two different files.  I could type in the
> whole path of MY DATA.TXT and enclose it double quotes or something?
>
> cp "/home/MY DATA.TXT" "MY DATA.BAK"
>
> Does traditional Unix allow spaces in file names?  What is the best
> way to deal with these kinds of file names?
>
> --
> 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

-- 
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

Reply via email to