![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| whats command for search including sub directory ? | gksenthilkumar | UNIX for Advanced & Expert Users | 2 | 03-01-2008 03:09 AM |
| including a library file ????? | skyineyes | Shell Programming and Scripting | 6 | 01-18-2008 12:55 AM |
| check the file every 15 seconds | alisevA3 | Shell Programming and Scripting | 4 | 06-24-2005 09:19 AM |
| HELP! The '/var/adm/message' file increase every few seconds??? | cloudsmell | Filesystems, Disks and Memory | 1 | 09-16-2002 09:31 PM |
| file creation date including seconds | krishna | UNIX for Advanced & Expert Users | 7 | 08-26-2002 08:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Is there a command (like ls -l) to get the file time stamp including seconds? The ls -l gives only the HH:MM, No SS
I don't have a C compiler to call stat() I don't a command like stat too. Please help. |
|
||||
|
I suppose, that is the precision in which the details are stored in the inode.
Even when you do a stat, HH : MM is the precision limit you get Code:
Access: 2007-05-12 01:54:00.000000000 Modify: 2007-05-12 01:54:00.000000000 Change: 2007-05-12 01:54:00.000000000 ![]() |
|
||||
|
That perl one liner (below) works perfectly. Can someone please explain what it is actually doing? I actually need the timestamp in this format:
yyyymmddhhmmss perl -e '@d=localtime ((stat(shift))[9]); printf "%02d-%02d-%04d %02d:%02d:%02d\n", $d[3],$d[4]+1,$d[5]+1900,$d[2],$d[1],$d[0]' file.now 08-08-2007 10:20:36 I don't understand the significance of "08-08-2007 10:20:36" after the filename? |
![]() |
| Bookmarks |
| Tags |
| perl, perl shift, shift, shift perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|