![]() |
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exclude a directory to tar | ust | UNIX for Dummies Questions & Answers | 2 | 03-13-2009 08:57 AM |
| list the files but exclude the files in subdirectories | shyjuezy | UNIX for Dummies Questions & Answers | 8 | 10-15-2008 02:42 PM |
| exclude a line | big123456 | Shell Programming and Scripting | 3 | 04-24-2008 01:31 PM |
| Exclude & Zip | dreams5617 | Shell Programming and Scripting | 1 | 02-11-2007 08:01 PM |
| Getting 'tar' to exclude | kuultak | UNIX for Dummies Questions & Answers | 6 | 02-07-2005 07:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
tar: how to exclude subdirectories?
If i have a bunch of directories that i normally backup with this:
tar cvhf /dev/rmt/0 /export/home How can i exclude certain subdirectories under the /export/home? tar cvhf /dev/rmt/0 /export/home | grep -v 'test' ? will that exclude anything named test, and any subdirectories under test? |
|
||||
|
tar again
Hmm, i followed that thread, came up with some useful info
BUT i ran the following: find /export/home /etc /usr | egrep -v "test/" > list.txt tar cvhf /dev/rmt/0 'cat list.txt' doesn't work. doesn't like the cat in there. what am i doing wrong? |
|
||||
|
tar exclude
aha, this worked:
#>find /export/home /etc /usr ! -type d -print | egrep 'test/' > Exclude.txt then #> tar cvfX backup.tar Exclude.txt /export/home /etc /usr 2 step process. Actually 3 cuz I have to put it on tape, but could put on tape in the 2nd process, skip the tar file. |
|
||||
|
quotes in tar
Darn, this got me before!~ on the date command. THe confusing thing is that ' works in the egrep part of the statement, but have to use ` for the cat part of it! but it says argument listing too long. hmm.
tar cvf /dev/rmt/0 `cat listing.txt` is what i put in. what do you think it's not getting? |
![]() |
| Bookmarks |
| Tags |
| tar, tar exclude |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|