there is a bash script that searches for files, sorts and deletes
find $DIR -name "*.*" -and -type f | sort -r | tail -n1 | xargs -i rm -rf '{}' how to make the deleted files written to the file
Source: https://ru.stackoverflow.com/questions/540487/
All Articles