cp command
HI,
how on linux I copy all the content of a whole directory including sub directories? thanks, Juan |
cp -R
man cp |
* slackie1000 is just being boring... *
hi there, if you want the same effect with one keystroke less.. Code:
cp -r regards, slackie1000 |
Just as an FYI:
Quote:
|
hi there,
Matir, did you get this message direct from man cp?? from mine... Code:
-R, -r, --recursive regards, slackie1000 |
Very odd. Yes, it was copied and pasted. What cp version do you have?
Code:
$ cp --version |
hi there,
Code:
cp (coreutils) 5.2.1 regards, slackie1000 |
Mine definitely came from a gentoo box. Specifically, with sys-apps/coreutils-5.2.1-r6 installed. My guess is that GNU coreutils does implement -R and -r in the same manner, but the manpage describes possible other behavior for portability in scripting. I, for some reason, have always used 'cp -Rp'. Maybe I just think it looks nicer than 'cp -rp' :)
|
hi there,
ok. just to share with my side also... i use cp like that.. first my alias... Code:
alias cp="cp -vp" Code:
cp -r slackie1000 |
Interesting. Never an occasion where you DON'T want to preserve permissions?
|
hi there,
indeed. i use this setup almost only as root and 90% of cp use is for backup purpose. that's why i think is interesting to keep original attributes: ownership + time regards, slackie1000 |
Quote:
|
There appears to be a difference between the
cp in coreutils and fileutils. Coreutils' version shows what Slackie and I see, fileutils' has what matir posted. Cheers, Tink |
Oddly enough, my system does not have fileutils installed. However, the manpage information is for fileutils.
Quote:
|
Quote:
of the stick, wouldn't it? Cheers, Tink |
All times are GMT -5. The time now is 02:01 PM. |