cp -u bugs me with skip/overwrite y/n questions
I'm backing up my ubuntu home folder from Fedora 7 because I'm in the course of reinstalling -Ubuntu freezes, and I can't figure out why... Started a thread last week: http://www.linuxquestions.org/questi...ck-ups-590324/
I was almost finished copying when I accidently closed the terminal window. I figure cp -rpuv (recursive, preserve owner, update, verbose) should resume it, but it asks me again for every file that already exists. Of course I'm deleting and copying again... Not worth the trouble, but if anybody has any idea why it doesn't work, or what my alternatives are... |
Is -i set in your ~/.bash_alias?
|
come again? :)
I suppose you mean .bash_profile (I don't have a .bash_alias) Code:
# .bash_profile |
Hi - it sounds like the -i flag for cp is on by default. I presume that this is what The_JinJ was suggesting. Often there are bash aliases, set in e.g. /etc/bashrc, or ~/bash_aliases, and cp could be set to cp -i.
You can list all current alias with Code:
alias -p However, even with the -i flag, the -u flag should lead you to skip over any file already copied, so there should be no over-write issues to query in the first place. In that case, it is a bit puzzling. -mark |
alternative:
rsync -vax source dest ... be careful with source, /path/ is not the same as /path. use -n for dry run to see if it's doing it correctly. |
to see if cp is aliased, type:
Code:
alias cp Code:
alias cp='cp -i' Code:
\cp -rpuv ... |
All times are GMT -5. The time now is 09:08 PM. |