|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Check number of files that were created before a date?
Hi all,
In a directory I have a lot of files created in history. However do I check the number of files that were created before a designated date? Thanks |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
One way to do this would be "find ! -newer" Most find commands (depending on your Unix/Linux) implement a -newer switch. Code:
find . -newer <date point file> -print The <date point file> is used as a reference of its inode contents for a date reference. All files newer than that are found. By using a bang (!) in front of the switch you can invert the function meaning you will list all files older than the reference. eg. Code:
find . ! -newer <file> -print Hope that helps. Using commands you can also tweak the inode contents of your date reference file to produce a date/time of your choosing. |
| Sponsored Links | ||
|
![]() |
| Tags |
| count, date |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Showing files that were created at a certain Date | jimas13 | Shell Programming and Scripting | 2 | 05-02-2011 04:35 AM |
| print out date of files last created?? | new bie | Shell Programming and Scripting | 4 | 11-15-2010 12:42 AM |
| Remove files which created date before 10 days on HP-UX | murad_fayez | Shell Programming and Scripting | 1 | 12-21-2008 05:05 AM |
| Display files created on particular date | amit_kv1983 | UNIX for Dummies Questions & Answers | 6 | 04-24-2008 06:40 AM |
| Copying files created after a specified date/time | jm6601 | Shell Programming and Scripting | 2 | 11-28-2007 12:29 PM |
|
|