Bestimmte files per befehl lvschen
Jan-Benedict Glaw
jbglaw at lug-owl.de
Tue Feb 13 10:43:40 CET 2001
On Mon, Feb 12, 2001 at 11:58:39PM +0100, Cord Beermann wrote:
> Hallo! Du (Philipp Suek) hast geschrieben:
>
> >> rm `find /pfad/ | grep -ive ".jpg" -ive ".gif" -ive ".swf` `find
> >/pfad/ -name
> >> "tn*" -o -name "TN*"`
> >
>
> >rm sagt immer zu lange parameter
>
> Das Ergebnis ist also zu lang, weil Du wohl zuviele Dateien fuer den
> 'rm' (man rm) in dem Verzeichnis hast. Dafuer sei Dir noch der Befehl
> 'xargs' (man xargs) ans Herz gelegt...
Warum? find kennt etwas ganz n�tzliches: '-exec':
find . -type f ! -name '*.jpg' -a ! -name '.....' -exec rm -f {} \;
...dann kann man sich die xags schenken.
MfG, JBG
--
Fehler eingestehen, Gr��e zeigen: Nehmt die Rechtschreibreform zur�ck!!!
/* Jan-Benedict Glaw <jbglaw at lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
"insmod vi.o and there we go..." (Alexander Viro on linux-kernel)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20010213/ce335635/attachment.sig>
More information about the Linux
mailing list