[EMAIL PROTECTED]:~$ whereis stat stat: /usr/share/man/man2/stat.2.gz [EMAIL PROTECTED]:~$ man dpkg (null): can't set the locale; make sure $LC_* and $LANG are correct Reformatting dpkg(8), please wait... [EMAIL PROTECTED]:~$ dpkg -S /usr/bin/stat dpkg: /usr/bin/stat not found. [EMAIL PROTECTED]:~$ stat Desktop bash: stat: command not found [EMAIL PROTECTED]:~$
Dave
Elie De Brauwer wrote:
Frankly I don't see your problem
[EMAIL PROTECTED]:~$ whereis stat
stat: /usr/bin/stat /usr/share/man/man1/stat.1.gz /usr/share/man/man2/stat.2.gz
[EMAIL PROTECTED]:~$ dpkg -S /usr/bin/stat
coreutils: /usr/bin/stat
[EMAIL PROTECTED]:~$ stat workdir/
File: `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 [EMAIL PROTECTED]:~$ stat -c %y workdir/
2003-07-21 16:14:04.000000000 +0200
-> modification in seconds after the epoch [EMAIL PROTECTED]:~$ stat -c %Y workdir/
1058796844
Can you be more specific about _what_ you actually want ?
hth
Elie De Brauwer
On Saturday 02 August 2003 10:07, David selby wrote:
Hello,
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 ?
Dave
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]