[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] tar -X and ~ is tricky
From: |
Ingo Lantschner |
Subject: |
[Bug-tar] tar -X and ~ is tricky |
Date: |
Fri, 2 Jan 2004 21:35:51 +0100 (CET) |
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
--------------------------------------------
- [Bug-tar] tar -X and ~ is tricky,
Ingo Lantschner <=