Hallo, Am Mon, 11 Sep 2006, Erhard Schwenk schrieb:
Quoting David Haller
: Insgesamt auch zu umstaendlich, das `ls` ist ueberfluessig und schon bei Leerzeichen in Dateinamen unbrauchbar.
Nunja.
Probiere es mal. (0)$ ls -b1 home/ b\ a\ r\ f foo (0)$ for d in `ls home/`; do echo "»$d«"; done »b« »a« »r« »f« »foo« (0)$ for d in home/*; do echo "»$d«"; done »home/b a r f« »home/foo« Du kannst gerne beim 'ls' noch rumprobieren, aber auch -b hilft nicht. [..]
Ich würds mal so probieren:
ls -d /home/*|while read $dir; do rm -rf "$dir/.local/share/Trash/"* done
Ja, das klappt in wesentlich mehr Faellen. Im /home o.ae. geht das, aber generell kann das auch Aerger machen. Das ist auch was voellig anderes als das "for x in `ls`;". -dnh -- Calvin: People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. Hobbes: Isn't your pants' zipper supposed to be in the front?