How to list files filtered out by date and delete them (ls, awk, rm)

ls -al | awk ' $7 >= 3 && $7 <= 27 && $8==2015 {print $9}' | xargs rm -f

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.