- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find files older than 2003
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 11:41 PM
08-09-2005 11:41 PM
Please let me know how to find files in a particular filesystem which is older than year 2003.
Thanks
Jagadesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2005 11:49 PM
08-09-2005 11:49 PM
Re: Find files older than 2003
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:11 AM
08-10-2005 12:11 AM
Re: Find files older than 2003
It doesn't show the year for files less than 6 months old.
Not sure of the syntax but try.
ls -l | awk '{if ($8<2003) print $0}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:11 AM
08-10-2005 12:11 AM
Re: Find files older than 2003
Put there 2 rows in a script and launch it:
let days=`date +'%j'`+730
find /etc -mtime +$var -exec ll {} \+
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:27 AM
08-10-2005 12:27 AM
Re: Find files older than 2003
in the commands above I wrote /etc, instead of this put the path you want to check.
Rgds,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:32 AM
08-10-2005 12:32 AM
Re: Find files older than 2003
your command doesn't consider that in the 8th fiels of "ls -l" for files modified in the current year, the OS put the modification hour, and is not recursive ;-))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:50 AM
08-10-2005 12:50 AM
Re: Find files older than 2003
Recursive is not a problem, we can simply use a loop or the -R option of ls.
But i have to check for date.
Gotcha,
Just in // of awk give a negation of : for the 8 field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 12:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 02:00 AM
08-10-2005 02:00 AM
Re: Find files older than 2003
DAYS=$(( $(caljd.sh) - $(caljd.sh 1 1 2003) ))
find . -type f -mtime +${DAYS} -print
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 03:34 AM
08-10-2005 03:34 AM
Re: Find files older than 2003
touch -t 0301010000 /tmp/time02
nohup find /u04 ! -newer /tmp/newfile.txt -size +5000000c -exec ls -l {} \;
this works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2005 03:36 AM
08-10-2005 03:36 AM