Remove all files in directory except last 20
I have question why is my cmd for “removing all files in directory except last 20” not working within cron but in command prompt yes. * * * * * ls -1tr /home/testusr/test | head -n -20 | xargs -d ‘\n’ rm -f > /var/opt/check.log 2>&1 Directory contains let say 100x files which are named … Read more