Operating System - HP-UX
1819504 Members
3044 Online
109603 Solutions
New Discussion юеВ

how to show seconds in ls output

 
SOLVED
Go to solution
Olga_1
Regular Advisor

how to show seconds in ls output

Hello,

I need to see hour, minutes and seconds when file was created. Is there any way to do it?

Thank you,
Olga
5 REPLIES 5
Sanjay_6
Honored Contributor

Re: how to show seconds in ls output

Pete Randall
Outstanding Contributor

Re: how to show seconds in ls output

john korterman
Honored Contributor
Solution

Re: how to show seconds in ls output

Hi,
if you are not too concerned about using the cpu resources you can try the old cpio trick:

# echo |cpio -o 2>/dev/null|cpio -ivt 2>/dev/null

regards,
John K.
it would be nice if you always got a second chance
john korterman
Honored Contributor

Re: how to show seconds in ls output

Hi again,
sorry, I had not read your question properly. What I suggested would show the last modification time for a file, but unix does not store the creation time, so I am afraid it is not possible to show that.

(blushing) regards and regrets,
John K.
it would be nice if you always got a second chance
Olga_1
Regular Advisor

Re: how to show seconds in ls output

John,

No problem, this is what I need. Thank you.