Portál AbcLinuxu, 26. dubna 2024 07:02
$ NECO="$(ls -lt | awk '{ print $9 }' | head -n120000 )" ; rm $NECOTomas
ls -t | head -n120000 | xargs rmTaktéž bez záruky
$ rm " neco.neco"...Tomas
ls -rt | head -n1 | tr '\n' '\000' | xargs -0 rm
Autodelete is a shell script for use with crontab. It allows the user several ways of deleting within specified paths: by date, by size, and by percentage of space used. In addition to these basic functions, it has the following features: debug mode; prints the 'rm' commands that the script would normally execute had debug mode been disabled, free limit; allows the user to set a minimum amount of free space that should be available on the site's device(s) before the script executes anything else (keeps disk usage low), exceptions; list of patterns in file/dirnames that if matched will not be deleted under any circumstances...
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.