0% found this document useful (0 votes)
21 views

Unix

The timestamps recorded for UNIX files are the last access, last modified, and last changed timestamps, but not a creation timestamp. When a file is first created, the last modified timestamp acts as the creation timestamp. The istat and fsdb commands can be used to view additional timestamp information for a file, including the true creation timestamp.

Uploaded by

subbuk143
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Unix

The timestamps recorded for UNIX files are the last access, last modified, and last changed timestamps, but not a creation timestamp. When a file is first created, the last modified timestamp acts as the creation timestamp. The istat and fsdb commands can be used to view additional timestamp information for a file, including the true creation timestamp.

Uploaded by

subbuk143
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

ls --full-time

TOPICS: AIX, SYSTEM ADMINISTRATION

The creation date of a UNIX file


UNIX doesn't store a file creation timestamp in the inode information. The timestamps recorded are the last access timestamp, the last modified timestamp and the last changed timestamp (which is the last change to the inode information). When a file is brand new, the last modified timestamp will be the creation timestamp of the file, but that piece of information is lost as soon as the file is modified in any way. To get this information, use the istat command, for example for the /etc/rc.tcpip file:
# ls -li /etc/rc.tcpip 8247 -rwxrwxr-- 1 root system 6607 Jan 06 06:25 /etc/rc.tcpip

Now you know the inode number: 8247.


# istat /etc/rc.tcpip Inode 8247 on device 10/4 File Protection: rwxrwxr-Owner: 0(root) Group: 0(system) Link count: 1 Length 6607 bytes Last updated: Last modified: Last accessed: Wed Jan Wed Jan Tue May 6 06:25:49 PST 2010 6 06:25:49 PST 2010 4 14:00:37 PDT 2010

The same type of information can be found using the fsdb command. Start the fsdbcommand with the file system where the file is located; in the example below the root file system. Then type the number of the inode, followed by "i":
# fsdb / File System: File System Size: Disk Map Size: Inode Map Size: Fragment Size: Allocation Group Size: Inodes per Allocation Group: Total Inodes: Total Fragments: / 2097152 20 38 4096 2048 4096 524288 262144

(512 byte blocks) (4K blocks) (4K blocks) (bytes) (fragments)

8247i i#: 8247 md: f---rwxrwxr-- ln: 1 uid: szh: 0 szl: 6607 (actual size: a0: 0x1203 a1: 0x1204 a2: 0x00 a4: 0x00 a5: 0x00 a6: 0x00 at: Tue May 04 14:00:37 2010

0 gid: 6607) a3: 0x00 a7: 0x00

mt: Wed Jan 06 06:25:49 2010 ct: Wed Jan 06 06:25:49 2010

You might also like