[expert] timestamp info in bash script

2002-12-18 Thread bascule
is there a way to obtain the time and date of a file without having to parse the ls command output? bascule -- 'I think, if you want thousands, you've got to fight for one.' (Small Gods) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com

Re: [expert] timestamp info in bash script

2002-12-18 Thread Jack Coates
On Wed, 2002-12-18 at 19:29, bascule wrote: > is there a way to obtain the time and date of a file without having to parse > the ls command output? > > bascule Sure, parse the stat output instead :-) -- Jack Coates Monkeynoodle: A Scientific Venture... Want to buy your Pack or Services from

Re: [expert] timestamp info in bash script

2002-12-18 Thread Jack Coates
On Wed, 2002-12-18 at 19:29, bascule wrote: > is there a way to obtain the time and date of a file without having to parse > the ls command output? > > bascule okay, serious answer this time. man bash and look for -ot and -nt -- "older than" and "newer than", respectively. -- Jack Coates Monke

Re: [expert] timestamp info in bash script

2002-12-19 Thread kwan
On Thu, 19 Dec 2002, bascule wrote: > is there a way to obtain the time and date of a file without having to parse > the ls command output? You can try using the stat(2) call. Just make the call then print only the information that you require. Want to buy your Pack or Services from MandrakeS

Re: [expert] timestamp info in bash script

2002-12-19 Thread bascule
thanks guys, stat looks like it, have to work out how to strip all those strange zeros though: 2002-12-20 04:08:37.0 + 2002-12-20 04:08:37.0 + what are those zeros after the seconds? bascule On Thursday 19 Dec 2002 4:57 pm, [EMAIL PROTECTED] wrote: > On Thu, 19 Dec 2002,