- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- list by a date range?
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
10-10-2003 01:11 AM
10-10-2003 01:11 AM
when I try an ls -ltr or ls -l etc I cant see back far enough to get the files I am looking for.
help!
Bob
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:14 AM
10-10-2003 01:14 AM
Re: list by a date range?
# ls -lt | more
# ls -ltr | more
The -t option will sort everything by date, and 'r' reverses it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:17 AM
10-10-2003 01:17 AM
Re: list by a date range?
The only way I can really think of to look for a specific date is with 'grep'.
# ls -l | grep "Oct 9"
# ls -lt | grep "Aug 31"
Note that if the date is a single digit number, then there are 2 space between the Month and the day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:17 AM
10-10-2003 01:17 AM
Re: list by a date range?
If you do not mind a bit of counting, e.g. list files whose last rev date is 3:
# find
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:19 AM
10-10-2003 01:19 AM
Re: list by a date range?
"ls -ltr | more" will at least allow you to page throught the output (press space) but another and somewhat duller approach is
"find / -mtime X -print" will list files modified in the last X days though i think
"find / -ctime X -print" is more likely to end up meaning created in the last X days (it doesn't but most of the time the result is the same)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:19 AM
10-10-2003 01:19 AM
Re: list by a date range?
sorry, I meant "files whose last revision date was three days ago".
regards,
John K,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:19 AM
10-10-2003 01:19 AM
Re: list by a date range?
You can use,
# ls -la | grep "Jan 22"
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 01:28 AM
10-10-2003 01:28 AM
Re: list by a date range?
Best way I can think of to do this is with touch & find.
touch -t 2 files, one at each end of the range & then use find with -newer for the low end & ! -newer for the high end plus an AND operator.
Little more work, but can be took all the way down to the seconds level & easily scripted.
HTH,
Jeff