Results 1 to 5 of 5
Hopefully somebody can help me out. I'm having trouble copying files as my source directory has spaces in them.
Example:
cp -m "//server1/directory 1/filename1" "//server2/directory 2/filename2"
using wildcards
cp -m ...
- 02-08-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
korn shell / filenames and directories with spaces
Hopefully somebody can help me out. I'm having trouble copying files as my source directory has spaces in them.
Example:
cp -m "//server1/directory 1/filename1" "//server2/directory 2/filename2"
using wildcards
cp -m "//server1/directory 1/*.filetype" "//server2/directory 2/"
I get the file not file error. Does anybody have any suggestions? Thanks in advance!
- 02-08-2008 #2Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
Use cp with the -r option
cp -r "folder one/" "folder two/"
- 02-08-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
- 02-08-2008 #4Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
You could use for example for C files;
cp *.c "home/fred/folder one/"
this copies only C files
- 02-09-2008 #5Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044


Reply With Quote
