100g for deleting


On the assumption that the post titled “Delete file when you have more than 100g for deleting” on the “Linux.com - Content Feed” is not an elaborate joke, it’s not unlikely that it will be deleted so I will conserve it here:

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

Ex;

#!/bin/bash -x
x=`TZ=GMT+24 date +%Y%m%d`
delcnt=0
for files in `find /path/of/file/to/eraser/ -name \*$x*.bin.gz`
do
echo "Deleting file $files"
/bin/rm -rf $files
delcnt=$(($delcnt + 1))
done

Best regards

Charles E. Rivera

Solaris Server Specialist Engeeneer

But then, Linux.com still aggregates Phoronix, so their focus is not exactly on quality.