Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Created March 9, 2016 23:14
Show Gist options
  • Save cellularmitosis/dd9c9cd3aa9be2e177d8 to your computer and use it in GitHub Desktop.
Save cellularmitosis/dd9c9cd3aa9be2e177d8 to your computer and use it in GitHub Desktop.
delete all but the latest three files
for i in `ls -1t *.tar.lzo | tail -n+4`
do
rm $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment