To remove the oldest files even though they lie in multiple directories
files=`find /var/share/temp/ \( ! -regex '.*/\..*' \) -type f -exec stat -c "%y %n" {} \; | sort | head -5 | tr -s ' ' ' ' | cut -d' ' -f4 "$@" `
for file in $files
do
rm -f ${file}
done
Tuesday, September 15, 2009
Subscribe to:
Post Comments (Atom)
.jpg)
No comments:
Post a Comment