The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> UNIX Help
|
list date with seconds from ls command
Discuss list date with seconds from ls command in the UNIX Help forum on Dev Shed. list date with seconds from ls command UNIX Help forum discussing the Unix Operating System and all variants including Irix, Solarix, and AIX. Unix was designed as a true multi-user operating system.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 13th, 2003, 11:13 AM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Orlando FL
Posts: 130
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
|
list date with seconds from ls command
Hello friends,
When I use "ls -l" command, it only list date of file with hour and minutes. Is there option that I can see by seconds?
Thanks
__________________
Help me, help you, help others...
|

January 13th, 2003, 01:12 PM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|
ls -l --time-style=full-iso
|

January 13th, 2003, 01:15 PM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Orlando FL
Posts: 130
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
|
Hi Strike, need little more help
it's not working!
tiger[netboss]/u01/app/netboss/sga/thresholding% ls -l --time-style=full-iso
ls: illegal option -- -
ls: illegal option -- e
ls: illegal option -- -
ls: illegal option -- y
ls: illegal option -- e
ls: illegal option -- =
ls: illegal option -- -
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
I am using Solaris 8
|

January 13th, 2003, 01:16 PM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Orlando FL
Posts: 130
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
Also I am using tcsh shell, if that's help you help me 
|

January 13th, 2003, 02:12 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
- on some versions of unix you are not allowed to mix short and long parameters. not sure about solaris. and my "ls" has no long version for "-l".
- my "ls" also has this parameter: "--full-time", try this
- "man ls" and "ls --help" can also provide valuable help. only the ones on your system though... 
|

January 13th, 2003, 02:15 PM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Orlando FL
Posts: 130
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
No, can't find it on Solaris 8 server.
It's such simple list and Unix is so inconsistant. Little disappointed.
|

January 13th, 2003, 08:23 PM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|
Hmm, on the Solaris machine that I checked, it says that you use LC_TIME to affect the date output, but then it points to a nonexistant man page (environ(5)) for what to use ... maybe you have that man page.
|

January 14th, 2003, 08:12 AM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Orlando FL
Posts: 130
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
OK, I will check it out. Thanks Strike!
So far I can get around using Perl:
perl -e 'foreach(@ARGV){$t =localtime ( ( ( stat ( $_ ) ) [9] ) ); printf("%-20s%s\n",$_,$t);}' *
pain, but works better with a simple alias 
Last edited by digitsnake : January 14th, 2003 at 08:27 AM.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|