OK, extreme newbie alert...there might even be a command for this, but....
I have a directory tree of print spoolfiles (all ascii) which has a
combination of files from last year and this year ... I want to delete all
the files with a year 2000 date... I can generate a list of these by using
'ls -l | grep 200' but the filename is in the right hand column...
-rw-rw-r-- 1 username group 2591 Mar 23 08:33 spool88848.din
-rw-rw-r-- 1 username group 22218 Mar 23 09:19 spool88905.din
-rw-rw-r-- 1 username group 11004 Apr 10 2000 spool88940.din
-rw-rw-r-- 1 username group 15464 Mar 23 10:48 spool88993.din
-rw-rw-r-- 1 username group 4359 Apr 10 2000 spool88994.din
-rw-rw-r-- 1 username group 2663 Mar 23 10:59 spool89007.din
-rw-rw-r-- 1 username group 2695 Apr 10 2000 spool89044.din
-rw-rw-r-- 1 username group 2663 Mar 26 09:12 spool89198.din
I guess its an option in 'find' but looking at the man pages I cant see any
date functions, apart from the 'ctime' and 'atime' thingies.
Thanks for any suggestions
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!