>1) Recursivly assend into a directory and remove files that
> are under a certain size (lets just say 5k)
>
>2) Recursivly assend into a directory and move all the files
> of a certain pattern (*.html) to one directory
Here's my 60-second rendition of a shell command that might
serve the purpose described in the first item:
(NOTICE: there's a tab character after the first '5' and
after the '[0-9]*' sequence - not spaces..)
# Recursive descent starting from current directory, searching
# for files of (say) 5k and deleting them:
du -kxa | sort -rn | sed -e '/^5 /,$d' -e 's/^[0-9]* //' | while read
victim; do if [ -f $victim ]; then rm $victim; else echo $victim not a FILE; fi; done
...and the second item might be accomplished (with some
gotchas like destruction of files with identical basenames)
as follows:
find . -name "*.html" -exec mv '{}' desiredTargetDirectory ';'
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************