(date) script for freenas
- by malgaboy
My webserver is running freenas 8.0.4.
Currently in /etc/crontab there is this task (daily)
find /mnt/vol1/1 -type f -mtime +16 -exec rm -R {} \;
This allow me to delete files older than 16 days..
infact every night a new file is added in /mnt/vol1/1 folder..
but now I wanna make a script that check the folder and keeps only the youngest 2 file..
whitout taking in consideration the days..
Thanks in advance. (sorry for my bad english).