Re: stat question
OK bit confused, normaly when a man page comes up, I assume app is
there. Seems that I do not have app installed. Checked aptitude, there
are a lot of stat packages, which one do I need to dpkg ?
web@debian:~$ whereis stat
web@debian:~$ man dpkg
(null): can't set the locale; make sure $LC_* and $LANG are correct
Reformatting dpkg(8), please wait...
web@debian:~$ dpkg -S /usr/bin/stat
dpkg: /usr/bin/stat not found.
web@debian:~$ stat Desktop
bash: stat: command not found
Elie De Brauwer wrote:
Frankly I don't see your problem
helios@kafka:~$ whereis stat
stat: /usr/bin/stat /usr/share/man/man1/stat.1.gz
helios@kafka:~$ dpkg -S /usr/bin/stat
helios@kafka:~$ stat workdir/
Size: 4096 Blocks: 8 IO Block: 8192 directory
Device: 304h/772d Inode: 671748 Links: 4
Access: (0755/drwxr-xr-x) Uid: ( 1000/ helios) Gid: ( 1000/ helios)
Access: 2003-08-02 08:55:49.000000000 +0200
Modify: 2003-07-21 16:14:04.000000000 +0200
Change: 2003-07-21 16:14:04.000000000 +0200
-> only the date
helios@kafka:~$ stat -c %y workdir/
2003-07-21 16:14:04.000000000 +0200
-> modification in seconds after the epoch
helios@kafka:~$ stat -c %Y workdir/
Can you be more specific about _what_ you actually want ?
Elie De Brauwer
On Saturday 02 August 2003 10:07, David selby wrote:
A while ago someone suggested using the stat command to get modification
times for files etc, ls -al will give the info but I would have to do a
lot of string stripping etc ...
I have looked up man "stat", confusing ... googled for it, confusing !
It is not a regular command, ie "stat" on the command line is a no go
though there is a man page for it.
It appears to be a "pearl" module ?
OK simple question. In a bash script can I use stat to get modification
times of files ?
If so what is the syntax ?