[plug] Using the "-X" modifier in tar

Colin Rothnie colinr at tiwest.com.au
Fri Mar 31 09:35:06 WST 2000


I guess I wasn't all that clear.  The tar exclude file is very sensitive to
the path you put in the file.  You must put the filename in the listing just
as tar would see it.

The following session listing shows an example of an exclude file in action.

[colin_r at mineplan temp]$ ls 
assay_test1.txt  assays.txt  collar_test.txt
assay_test2.txt  collar.txt  exclude_list.txt

[colin_r at mineplan temp]$ more exclude_list.txt
assay_test1.txt
assay_test2.txt
collar_test.txt

[colin_r at mineplan temp]$ tar cvf /tmp/temp.tar -X exclude_list.txt .
./
./exclude_list.txt
./assays.txt
./collar.txt

Note that I couldn't use the full path name in the exclude list (eg
/tmp/temp/assay_test1.txt) or else it wouldn't have worked.

Cheers
Colin Rothnie




More information about the plug mailing list