Sponsored Content
Full Discussion: Ls -l and rm
Top Forums UNIX for Beginners Questions & Answers Ls -l and rm Post 303038553 by MadeInGermany on Thursday 5th of September 2019 03:50:34 PM
Old 09-05-2019
It is also doable with
Code:
ls -l | while read a b c d e f g h fn; do if [ "$f" = "Aug" ] && [ "$g" = "1" ]; then echo rm "$fn"; fi; done

If you are happy then remove the echo before the rm.
Caution: this will match all "Aug 1" files, regardless of the year.

BTW the same technique works with find ... -exec echo rm {} \;
 
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy