Remove 5 last modified files on bash
Once in the directory containing the files:
ls -t | tail -n -5 | xargs -d '\n' rm -rf
Written by Juan Diego Gonzales
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#