Hello Linix community members,
Today I would like to share a simple script for deleting files when you have more than 100g for deleting and when you try to delete using rm -rm /path/fo/files failed.
To do this I use the following procedure;
first I use a "for" ciclo to read file that I going to delete also you can use a mtime for calculate file's date that you're going to delete or you can to calculate previous date of a past day "x=`TZ=GMT+24 date +%Y%m%d`"
x=`TZ=GMT+24 date +%Y%m%d`
for files in `find /path/of/file/to/eraser/ -name \*$x*.bin.gz`
echo "Deleting file $files"
/bin/rm -rf $files
delcnt=$(($delcnt + 1))
Charles E. Rivera
Solaris Server Specialist Engeeneer