Re: [OT] Probleme mit Dateinamen aus der Windows-Welt
DIrk Wernien <yellowbeart@gmx.net> writes:
> Angefangen habe ich mit:
> find /src/dir/ -type f -print | xargs chmod 644
> das scheiterte an den Leerzeichen, daher nun:
>
> find /src/dir/ -type f -print | xargs -I '{}' chmod 644 '{}'
> erledigt wenigstens schon die lästigen Leerzeichen, aber:
>
> xargs: unmatched einfache quote; by default quotes are special to xargs
> unless you use the -0 option
^^^^^^^^^
Hast du es damit denn schon probiert?
> Mir würde es reichen, wenn ich alle ' durch _ ersetzt bekäme - nur wie
> geht das? sed? (Oh Graus!) Oder kann ich xargs überreden die Quotes in
> den Dateinamen zu ignorieren - man xargs hilft mir nicht mehr weiter.
-0 Input items are terminated by a null character instead of by
whitespace, and the quotes and backslash are not special (every
character is taken literally). Disables the end of file
string, which is treated like any other argument. Useful when
input items might contain white space, quote marks, or
backslashes. The GNU find -print0 option produces input
suitable for this mode.
Grüße,
Ansgar
--
PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19
Reply to: