- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ls doubt
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
05-31-2006 07:29 AM
05-31-2006 07:29 AM
rw-rw-r-- 1 XYZ mygrp 6648 Dec 14 16:27 dec05.txt
i heard if no year is displayed then its current year...but for above its DEC (last year) and still not showing year part ??
am i missing something ? is there any settings we need to change ?
THANKS
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 07:33 AM
05-31-2006 07:33 AM
Re: ls doubt
ls -l;
If the time of last modification is greater
than six months ago, or any time in the future, the year is
substituted for the hour and minute of the modification
time.
regards;
mustafa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 07:36 AM
05-31-2006 07:36 AM
Re: ls doubt
But being serious now, this is not a pure ls output. How about the "date"? Perhaps you invoked "ls" with other options (there are really a lot).
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 07:38 AM
05-31-2006 07:38 AM
Re: ls doubt
any option thru which we can see year details also , using ls command even if the file's last modified date is less than 6 months ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 07:41 AM
05-31-2006 07:41 AM
Re: ls doubt
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=193814
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 07:44 AM
05-31-2006 07:44 AM
Re: ls doubt
No, the rule is that if the age is older than 6-months, then the year is substituted in lieu of the time.
By definition, this would be 180-days ago or 15,552,000 seconds ago, or just before the current time on December 2, 2005.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 08:18 AM
05-31-2006 08:18 AM
Re: ls doubt
If all you want to see is a file's modification ('mtime') timestamp you can do:
# perl -wle 'print scalar localtime ((stat($ARGV[0]))[8])' filename
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 08:22 AM
05-31-2006 08:22 AM
Re: ls doubt
OOPS! Sorry, for a file's 'mfile' that should be:
# # perl -wle 'print scalar localtime ((stat($ARGV[0]))[9])' filename
...the previous post would return the file's 'atime'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2006 08:24 AM
05-31-2006 08:24 AM
Solutionsave as 'lsi' for default behaviour. (sym)link to 'lsm' to get it use the mtime, and to 'lsc' to use ctime, and to 'lsa' to use atime.
options: -a select - and sort by access times
default for lsa
-c select - and sort by change times
default for lsc
-m select - and sort by modification times
default for lsi
-n sort by name default by time
-i sort by inode
-s sort by size
-r reverse default sort order
-f don't sort, print on find
-R recursive search
-t tail, print last 16 entries
-? print help
Enjoy, Have FUN! H.Merijn