exclude directory with cp
Hello,
I want to exclude an directory from copying. cp --exclude ... does not work. Any ideas? regards |
Looking at the man page there is no exclude option: http://man.linuxquestions.org/index....ction=0&type=2
Why not just delete afterwards? cp -R <directory/filename> | rm -rf <directory-filename> |
Or, if the directory happens to be very large, and so you don't want to waste cpu resources copying it just to delete it, then move the directory up a level, which won't take up much time, and then copy it, then replace it.
|
Or use rsync to copy, it does have an --exclude option.
|
All times are GMT -5. The time now is 08:52 PM. |