Results 1 to 5 of 5
Hi everybody
Here is what i am trying to do
yasarcay(at)skynet:~$ cd work
yasarcay(at)skynet:~/work$ ls
Move and Copy Files in Linux at the Command Line.odt dir2 dir32 kubuntu linux commnads.odt
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-04-2013 #1Just Joined!
- Join Date
- Feb 2013
- Posts
- 7
Moving, copying with spaced file names why not working
Hi everybody
Here is what i am trying to do
yasarcay(at)skynet:~$ cd work
yasarcay(at)skynet:~/work$ ls
Move and Copy Files in Linux at the Command Line.odt dir2 dir32 kubuntu linux commnads.odt
yasarcay(at)skynet:~/work$ mv linux commnads.odt linux commands.odt
mv: target `commands.odt' is not a directory
yasarcay(at)skynet:~/work$ mv linux commnads.odt dir2
mv: cannot stat `linux': No such file or directory
mv: cannot stat `commnads.odt': No such file or directory
yasarcay(at)skynet:~/work$ cp linux commnads.odt dir2
cp: cannot stat `linux': No such file or directory
cp: cannot stat `commnads.odt': No such file or directory
yasarcay(at)skynet:~/work$
Where am i doing a mistake. Please help...
- 02-04-2013 #2
Hi and Welcome !
Spaces in filename is creating problem and you should use underscore ( _ ) instead of space.
Use Escape symbol \ or hit TAB key to auto-complete filename.
OrCode:yasarcay(at)skynet:~/work$ cp linux\ commnads.odt dir2
I would suggest you to visit linuxcommand.orgCode:yasarcay(at)skynet:~/work$ cp linux<hit TAB key>
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 02-04-2013 #3Just Joined!
- Join Date
- Feb 2013
- Posts
- 7
Thank you very much. it has worked.
- 02-05-2013 #4
While the above method works, and is correct, you'll be hard pressed to fully escape spaces.
For that reason, I mention that you can also use double quotes, this will work too, for a file named "Linux Commands.odt" (no quotes):
Though since we're all using Bash, let's just go with the second part mentioned by devils and tab complete the **** out of any pathCode:mv "Linux Commands.odt" ~/Desktop
.
- 02-05-2013 #5Just Joined!
- Join Date
- Feb 2013
- Posts
- 7
@ Syndacate
Thanks a lot.




