ls -l timestamp display format


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users ls -l timestamp display format
# 1  
Old 08-11-2009
Bug ls -l timestamp display format

The time stamp format using "ls -l" is either mmm dd hh:mm or mmm dd yyyy.

For later case, how can I know the hh:mm as well. Thanks.
# 2  
Old 08-11-2009
Code:
ls --full-time

but it depends on the OS.
# 3  
Old 08-11-2009
Quote:
Originally Posted by sysgate
Code:
ls --full-time

but it depends on the OS.
I execute it under SunOS 5.8 but it failed. Anyway, thanks...

ls: illegal option -- -
ls: illegal option -- -
ls: illegal option -- e
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
# 4  
Old 08-11-2009
Upgrade your CoreUtils?

Quote:
Originally Posted by pok.fung
I execute it under SunOS 5.8 but it failed. Anyway, thanks...

ls: illegal option -- -
ls: illegal option -- -
ls: illegal option -- e
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
You may want to check out SunFreeware and try coreutils. I have not tried but very possible this will give you the opts you want.

Good Luck!
J
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Timestamp format in HP-UX

I am on HP-UX B.11.11 OS. My requirement is to display a list of directories (not files) and the last modified time format should be DD-MON-YYYY HH:MI:SS AM/PM. I am able to get the list using either ls -lF | grep / OR ls -ld -- */ but I am unable to set the time format as I want. The... (5 Replies)
Discussion started by: nickz2017
5 Replies

2. Shell Programming and Scripting

Display lines between timestamp

Hi Gurus, I have a software which logs event in the log file and it has become to big to search into it. I want to display all the lines from the log files between <Jul 21, 2016 3:30:37 PM BST> to <Jul 21, 2016 3:45:37 PM BST> that is 15 min data . Please help Use code tags, thanks. (10 Replies)
Discussion started by: guddu_12
10 Replies

3. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

4. UNIX for Dummies Questions & Answers

Display files based on particular file timestamp

Hi, I have requirement to list out files that are created after particular file. ex. I have below files in my directory. I want to display files created after /dirdat/CG1/cg004440 file. ./dirdat/CG1/cg004438 09/07/14 0:44:05 ./dirdat/CG1/cg004439 09/07/14 6:01:48 ... (3 Replies)
Discussion started by: tmalik79
3 Replies

5. Shell Programming and Scripting

Display .bash_history with timestamp using script

Hi would like to ask if there is anyway to display .bash_history with timestamp using shell script? i know that you should use history command with HISTTIMEFORMAT="%d/%m/%y %T " to display it in terminal but it does not work when i use it on shell script. It seem that you can't run history... (1 Reply)
Discussion started by: pikamon
1 Replies

6. Shell Programming and Scripting

Getting file timestamp in certain format

Hi all, I'm a Unix newbie and I need to get file timestamp in the following format: YYYYMMDD HH24:MM:SS example: 20120713 18:49:30 For start I've tried the following code, but I don't know how to display the year and even format the date: ls -l $filename | awk '{print $7 $6 $8}' My... (4 Replies)
Discussion started by: Braun
4 Replies

7. UNIX for Dummies Questions & Answers

Format/Fix Timestamp Data in a File.

Hello Experts, I have a timestamp(6) column in a .csv data file , format of the data is as below:- ETCT,P,Elec, Inc.,abc,11/5/2010 4:16:09.000000 PM,Y,Y,Y I want the timestamp column to be properly formatted like 11/05/2010 04:16:09.000000 PM Currently the "0" is missing with... (3 Replies)
Discussion started by: mtlrsk
3 Replies

8. Programming

converting unix timestamp into readable format using c++

hi everyone, im new here and am in desperate need of help. I want to convert my 32 bit unix time stamp ' 45d732f6' into a readable format (Sat, 17 February 2007 16:53:10 UTC) using c++. I have looked around the interent but i just cant make sense of anything. All examples i can find just... (3 Replies)
Discussion started by: uselessprog
3 Replies

9. UNIX for Advanced & Expert Users

get the timestamp of a file in desired format

Hi, I have a file say abc. I get the timestamp in following way: ls -ltr abc | awk -F" " '{print $6,$7,$8}' Mar 8 10:23 I need to get the timestamp as : 03-08-2007 10:23:00 Thanks Sumeet (1 Reply)
Discussion started by: sumeet
1 Replies

10. UNIX for Dummies Questions & Answers

display the timestamp of a server UNIX

I can't find the command shell UNIX to display the timestamp of the current date. It's not an option of the commande date. (3 Replies)
Discussion started by: nicolas
3 Replies
Login or Register to Ask a Question