tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Find out last modtime of a file?


From: Kai Grossjohann
Subject: Find out last modtime of a file?
Date: Sun, 18 Jan 2004 20:31:33 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux)

In addition to invoking Perl and the /usr/bin/stat (or /bin/stat?)
program, which other ways can you think of to find the last modtime of
a file?

Here's what does not work:

The output of "ls -l" is unreliable, giving only month and day for
old files.

The output of /usr/bin/stat appears to differ widely.

FreeBSD prints a single line like this:

address@hidden stat /
1039 2 drwxr-xr-x 21 root wheel 1096 512 "Jan 18 21:04:05 2004" "Jan 17 
22:55:32 2004" "Jan 17 22:55:32 2004" "Sep  9 02:06:48 2003" 4096 4 0 /

GNU/Linux prints lots of lines like this:

20:01:49 austin> stat /
  File: "/"
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 801h/2049d      Inode: 2           Links: 25   
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sun Jan 18 20:22:25 2004
Modify: Mon Dec 15 09:49:29 2003
Change: Mon Dec 15 09:49:29 2003

Solaris 2.6 does not appear to have the command.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]