[SWLUG] timestamp in bash script

bascule asura at theexcession.co.uk
Thu Dec 19 14:05:39 UTC 2002


thanks guys,
i came across the stat command in some documentation but there was no mention 
of switches to alter the output, should have thought to investigate further,
i'm a bit intrigued by the output:
2002-12-19 02:49:24.000000000 +0000
2002-12-19 02:49:50.000000000 +0000
what are all the zeros?
also, can i have colons in filenames, i'm after making filenames using the 
timestamp of the respective file, would gawk be the best thing in a small 
script to parse the above to get just the date and time

bascule

On Thursday 19 Dec 2002 5:46 am, Robert McQueen wrote:
> On Thu, Dec 19, 2002 at 03:29:19AM +0000, bascule wrote:
> > is there a way to obtain the time and date of a file without having to
> > parse the ls command output?
> >
> > bascule
>
> Have a look at stat. It should be able to tell you anything you want to
> know about a certain file or filesystem in whatever format you want.
>
> Regards,
> Rob
>
>
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org.uk
> http://swlug.org.uk/mailman/listinfo/discuss

-- 
'We'll all be killed.'
'Think of it as the lesser of two evils.'
'What's the other one?'
Vimes drew his sword.
'Me.'
(Jingo)





More information about the Swlug mailing list