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

Phillip Steege psteege at tpg.com.au
Fri Mar 31 15:08:40 WST 2000


Colin,

  Thanks for clearing that up for me.  I appreciate it very much.
I have been trying to do a backup, on a Sun, and it kept trying to backup
/dev/fd and /proc everytime.  I didn't want those directories included.

Phil

> -----Original Message-----
> From: Colin Rothnie [mailto:colinr at tiwest.com.au]
> Sent: Friday, 31 March 2000 09:35
> To: 'plug at plug.linux.org.au'
> Subject: RE: [plug] Using the "-X" modifier in tar
>
>
> 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