tar a --exclude

Petr Vejsada daemon na nospam.exe
Pátek Červenec 12 10:39:03 CEST 2002


Hello All!

je ten tar sileny ?

root na linux:/tmp# tar -cf tar.tar tar/ --exclude tar/2dir
root na linux:/tmp# tar -tvf tar.tar
drwxr-xr-x root/root         0 2002-07-12 10:32 tar/
drwxr-xr-x root/root         0 2002-07-12 10:31 tar/1dir/
-rw-r--r-- root/root         0 2002-07-12 10:31 tar/1dir/1file
drwxr-xr-x root/root         0 2002-07-12 10:32 tar/2dir/
-rw-r--r-- root/root         0 2002-07-12 10:31 tar/2dir/2file
drwxr-xr-x root/root         0 2002-07-12 10:32 tar/2dir/2dir2/
-rw-r--r-- root/root         0 2002-07-12 10:32 tar/2dir/2dir2/2file2
drwxr-xr-x root/root         0 2002-07-12 10:31 tar/3dir/
-rw-r--r-- root/root         0 2002-07-12 10:31 tar/3dir/3file

toto je IMHO spatne.


root na linux:/tmp/tar# tar -cf tar.tar . --exclude 2dir
tar: tar.tar is the archive; not dumped
root na linux:/tmp/tar# tar -tvf tar.tar
drwxr-xr-x root/root         0 2002-07-12 10:40 ./
drwxr-xr-x root/root         0 2002-07-12 10:31 1dir/
-rw-r--r-- root/root         0 2002-07-12 10:31 1dir/1file
drwxr-xr-x root/root         0 2002-07-12 10:31 3dir/
-rw-r--r-- root/root         0 2002-07-12 10:31 3dir/3file

A takto to udela IMHO spravne. Nojo, ja bych potreboval excludovat 
adresare hloubeji vnorene, nez na 1. urovni. Slo by to ?

Petr /daemon(zavinac)svoboda(tecka)cz/



Další informace o konferenci Linux