Copy directory execlude directory
Hello;
I'd like to copy all contents of directory except directory name Library, what's syntax should I use. for example:- ls /home/user/ redhat centos fedora library and so on I'd like to copy /home/user/* except library directory |
cp -r /home/user/* /cpdir/ && rm -r /cpdir/library
The "copy files from directory to directory without subfile" thread in the Similar Threads just below also has a solution, but this method seems much less tedious. (Unless of course the "library" directory is so huge it would take hours to copy the whole thing) |
Quote:
all files which i need to copy about 10MB but Library directory is 30GB. I need to use wildcard. |
I like to use rsync with exclude='somedirectory'
For example: rsync -av --exclude='.thunderbird' /home/fred/ /etc/skel |
All times are GMT -5. The time now is 10:23 AM. |