System Administration

Re: mtime ctime atime .... etc output.

 
SOLVED
Go to solution
jerry1
Super Advisor

mtime ctime atime .... etc output.

Does anyone know what the command is to
display the hidden infomation of a file?
Namely: atime, mtime, ctime ... etc

I have done it before but can't remember
how I did it.
11 REPLIES 11
Rodney Hills
Honored Contributor

Re: mtime ctime atime .... etc output.

ls -l displays last modify
ls -lc displays last ctime
ls -lu displays last atime

HTH

-- Rod Hills
There be dragons...
Bruno Ganino
Honored Contributor

Re: mtime ctime atime .... etc output.

Yes, ls command with following options:

-a List all entries, including those that begin with a period (.),
which are normally not listed.

-A Like -a except it does not list the . and .. directories.


-L When listing status, if an argument is a symbolic link, list the
status of the file or directory referenced by the link rather than
that of the link itself. This option will have no effect if the
argument is a dangling link.

-l List in long format, giving mode, number of links, owner, group,
size in bytes, and time of last modification for each file (see
below). If the file has an Access Control List (ACL) the mode
specification will be followed by a ``+''. If the file is
a special file, the size field contains the major and minor device
numbers rather than a size. If the file is a symbolic link, the
filename is printed followed by ``->'' and the pathname of the
referenced file.

-t Sort by time stamp (latest first) instead of by name. The default
is the last modification time. (See -u and -c.)

-u Use time of last access instead of last modification for sorting
(with the -t option) or printing (with the -l option).

-c Use time of last modification of the i-node (file created, mode
changed, and so on) for sorting (-t) or printing (-l).

-F Put a slash (/) after each filename if the file is a directory, an
asterisk (*) if the file is executable, an equal sign (=) if the
file is an AF_UNIX address family socket, and an ampersand (@) if
the file is a symbolic link. Unless the -H option is also used,
symbolic links are followed to see if they might be a directory; see
above.

-s Give size in blocks, including indirect blocks, for each entry.
Holes in files are not included in the size. A ``block'' is 512
bytes.

HTH
Bruno


Torino (Turin) +2H
Puller_1
New Member

Re: mtime ctime atime .... etc output.

Thanks for cutting and pasting the man page, Bruno!
Bruno Ganino
Honored Contributor

Re: mtime ctime atime .... etc output.

Puller,
This answer to question is not correct ?
Cutting and pasting the "options specific" is more easy of write for me (my language isn't american).
You are not agree ???
Bruno
Torino (Turin) +2H
jerry1
Super Advisor

Re: mtime ctime atime .... etc output.

Actually there is/was a binary that you
could run against a file that would output
all the hidden header info about a file.
I may be confusing this ability with something that exists on Solaris and may
not exist on HP. I'll keep looking but
thanks for all your inputs. If I find it
I will post it.
Mark Grant
Honored Contributor

Re: mtime ctime atime .... etc output.

Jerry,

By hidden header information I presume you mean all the stuff that's kept in the inode.

If you want to access this info, you need to write a small "C" program and use the "fstat()" system call.
Never preceed any demonstration with anything more predictive than "watch this"
jerry1
Super Advisor

Re: mtime ctime atime .... etc output.

Yes, fstat. I came across this in the man pages. But I am not much of a C programmer
at this point. I must have at one time downloaded a pre-compiled bin that does
what I am looking for.

Thanks
Rodney Hills
Honored Contributor
Solution

Re: mtime ctime atime .... etc output.

Their already is a program available-

goto
http://hpux.cs.utah.edu/hppd/hpux/Shells/fstat-1.0/

This allows dumping of the "fstat" info.

HTH

-- Rod Hills
There be dragons...
Ramkumar Devanathan
Honored Contributor

Re: mtime ctime atime .... etc output.

Hi,

The fstat depot for hp-ux is available here -

http://hpux.cs.utah.edu/hppd/hpux/Shells/fstat-1.0/

fstat command is available by default on linux, but not on hpux.

- ramd.
HPE Software Rocks!