| Tar all files and exclude a folder? How to tar all files and folders in current folder except one folder? |
sunroof

msg:3597898 | 10:53 pm on Mar 11, 2008 (gmt 0) | How to tar all files, folders, subfolders... in current folder except one folder named 'test'? something like: tar -cf all.tar * + exclude 'test' Thanks
|
lammert

msg:3597965 | 12:06 am on Mar 12, 2008 (gmt 0) | You first need to allow extended wildcard options, you can then exclude files or directories from the tar command line. I use the following commands to backup everything in /usr/src, except for the sub directories that start with "linux-2.6". You need to experiment a little to see how you have to construct the excluding wildcard options for your situation. shopt -s extglob /bin/tar -cf all.tar usr/src/!(linux-2.6*) |
|
|
OutdoorWebcams

msg:3598633 | 4:43 pm on Mar 12, 2008 (gmt 0) | You might also try this: tar -cf all.tar --exclude test *
|
|
|