- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ll and obtaining date and timestamps
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
Discussions
Discussions
Forums
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
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
тАО04-24-2008 09:18 AM
тАО04-24-2008 09:18 AM
Again what I'm trying to do is use ll to show tme date and time of files older than a year.
Any help would be greatly appreciated!
Thanks,
KPS
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 09:52 AM
тАО04-24-2008 09:52 AM
SolutionThis is the normal behavior of 'ls'. However, using a small Perl snippet:
# perl -MPOSIX -le '@ARGV=glob("*") unless @ARGV;for (@ARGV) {print join " ",strftime("%m/%d/%Y %H:%M",localtime((stat $_)[9])),$_}'
Simply 'cd' to the directory you want to examine, or run the above with an argument like:
/etc/*
This isn't recursinve, but acts like a simple 'ls -l'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 10:06 AM
тАО04-24-2008 10:06 AM
Re: ll and obtaining date and timestamps
If you want a recursive list (as with 'find'), this is quick:
# perl -MPOSIX -MFile::Find -le '@ARGV=(".") unless @ARGV;find(sub{print join " ",strftime("%m/%d/%Y %H:%M",localtime((stat $_)[9])),$File::Find::name},@ARGV)' /path
...either pass the '/path' you want to examine as the argument, or omit it and your current directory will be examined.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 10:09 AM
тАО04-24-2008 10:09 AM
Re: ll and obtaining date and timestamps
I appreciate your help....
/KPS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 10:13 AM
тАО04-24-2008 10:13 AM
Re: ll and obtaining date and timestamps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 10:40 AM
тАО04-24-2008 10:40 AM
Re: ll and obtaining date and timestamps
Very well, then see (also) my post from the other day with an 'ls' kludge I once found (somewhere) in the ITRC:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1225117
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2008 07:55 PM
тАО04-25-2008 07:55 PM
Re: ll and obtaining date and timestamps
# ll | awk 'match(length($8),4)'