Microwaved Meatloaf
  • Home
Subscribe
Tagged

bash

A collection of 1 post

Keep the N newest files in bash (and delete the others)
bash

Keep the N newest files in bash (and delete the others)

When we deploy we don't automatically clean the old versions out. Since each one of these can quite large, and we deploy > 1 service on each box, the total size can get out of hand quite quickly. This one liner removes all but the newest 10 directories (in our

  • Andrew Backer
Andrew Backer May 30, 2016 • 1 min read
Microwaved Meatloaf © 2022
Powered by Ghost