2006-04-07 11:26
by Vasil KolevMorning mood – the best for writing scripts that delete stuff:
#!/bin/sh #Lasciate ogni speranza, voi ch'entrate cd /home/samba/profiles || exit 3 for i in *; do mkdir -p /home/samba/trash/$i find . -type f -iname \*.tmp -print0 |xargs -0 rm -f find . -type f -iname \*.mp3 -print0 |xargs -0 mv --target-directory=/home/samba/trash/$i/ find . -type f -iname \*.avi -print0 |xargs -0 mv --target-directory=/home/samba/trash/$i/ done
If you feel like it, look up the translation of line 3 :)