Created
September 17, 2015 21:08
-
-
Save gka/215473f91a5fed61b212 to your computer and use it in GitHub Desktop.
Remove everything but five newest files/directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ls -t|head -n 5;ls)|sort|uniq -u|xargs rm -Rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment