Results 1 to 3 of 3
hi guys,
when copying or moving files or directories using cp or mv
do you have to be in that working directory (be where the files or dirs are that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-03-2013 #1Just Joined!
- Join Date
- Dec 2012
- Posts
- 42
quick one about cp and mv commands
hi guys,
when copying or moving files or directories using cp or mv
do you have to be in that working directory (be where the files or dirs are that you want to copy) whats the quickest way to do this as i find some paths really long...is there a trick or secret to doing this?
thanks
j0n1n
- 02-03-2013 #2
No. You can be anywhere the file system and use absolute paths (starting from the root). Personally, I usually end up in the destination directory so I can simply use . to mean to here
however the tab key is your friend when typing at the command line. Enter the first few characters and press tab...Code:cp -R /home/someuser/filesinareallylongdirectoryname/to/copy .
You'll love itCode:cp -R /home/some<TAB>/fil<TAB>/to/copy .
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
Snakey Wakey!
The Fifth Continent reborn
- 02-03-2013 #3Just Joined!
- Join Date
- Dec 2012
- Posts
- 42
thanks for that man...this truly is the best forum i have ever laid my fingers on...


Reply With Quote
