tar -X and ~ is tricky

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, 

seems as if the leading / make other problems beside of updating
an archive (see some dayes ago on this list):

If you want to exclude certain directories from beeing stored in an 
archive, you MUST NOT use the ~-wildcard in the file which describes the 
not-to-archive-files.

	$ tar -cvf some.tar -X nobak.txt somepath 

will work if nobak.txt 

reads like: 
---- snip ----
*.iso
home/*/.opera/cache4
home/*/.mozilla/temp
home/*/tmp
reads like
---- snap ----


But it will fail, if nobak.txt is like:
---- snip ----
*.iso
~/.opera/cache4
~/home/*/.mozilla/temp
~/home/*/tmp
---- snap ----

The reason may be, that ~ translates to /home/username which is different 
from home/username (see the missing Slash!). tar removes the leading slash 
by default, in order to have a relative path.

Bye, Ingo.


-- 
 Tel +43-1-5955766
 Mobil +43-664-1438418
 Web http://ingo.netomania.at/
 -------------------------------------------
       Ihr und Wir -- Bino na Biso 
 http://ingo.netomania.at/bnb/de/index.html
--------------------------------------------


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux