remove files in unix

Posted by nikhil on Super User See other posts from Super User or by nikhil
Published on 2011-01-11T10:23:24Z Indexed on 2011/01/11 10:56 UTC
Read the original article Hit count: 267

Filed under:

Hi all, I often face this problem. I have a set of files in a folder and would like to delete all of them except a few. for example..if i have files named according to the date of creation(like 11-1-11.tar, 10-1-11.tar and so on). Now i would like to delete files like 10-1-11, 9-1-11 and so on but not some other files. Basically i would like to enforce what all should be deleted and what should be retained. How would i do this?

© Super User or respective owner

Related posts about unix