  | |  | tar -X and ~ is tricky | tar -X and ~ is tricky 2004-01-03 - By Ingo Lantschner
Back 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 -- ---- ---- ---- ---- ---- ---- ---- ------
Earn $52 per hosting referral at Lunarpages.
|
|
 |