On Fre, 06 Jun 2003 at 09:25 (+0200), David Haller wrote: Moin, [...]
Also, selbst wenn das mit "normalen" Dateinamen klappt, robust ist das nicht...
ACK
dh@slarty[1]: /tmp/test3 (0)$ ls -b1 a\tb b\\tc c\nd [...] Was meist besser klappt:
==== $ find . -type f -print0 | tar cv -f test.tar --null -T - ====
Wie's scheint hat aber find oder tar mit dem '\' Probleme:
==== $ find . -type f -print0 | tar cv -f test.tar --null -T - ./a\tb tar: Cannot add file ./b c: No such file or directory ./c\nd tar: Error exit delayed from previous errors ====
Man beachte aber: 'c\nd' wird mit eingepackt... Warum tar beim '\\t' net will versteh ich auch net. find macht jedenfalls das richtige:
IMHO stänkert die Shell da. Die Sonderbedeutung des Backslash als Entwerter wird ja nicht aufgehoben. Das sieht man auch daran, dass nur ein \ beim tar ankommt - das übliche Verhalten.
$ find . -type f -print0 | od -tx1 0000000 2e 2f 61 09 62 00 2e 2f 62 5c 74 63 00 2e 2f 63 ^^ Da! nur noch einer.
0000020 0a 64 00 2e 2f 74 65 73 74 2e 74 61 72 00 0000036 ====
Hm. Jan? Hast du ne Idee? Is mein Tar zu alt?
==== $ tar --version | head -1 tar (GNU tar) 1.12 ====
Auf meiner nagelneuen SuSE 8.2 ists auch nur eine 1.13 und sie zeigt das gleiche Verhalten. Auf die Schnelle fällt mir jetzt nix ein - ich will ins Bett :-) Jan