Ls

Aus SchnallIchNet
(Weitergeleitet von Mtime)
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Misc

atime = access time
Access time shows the last time the data from a file was accessed – read by one of the Unix processes directly or through commands and scripts.

ctime = change time
ctime also changes when you change file's ownership or access permissions. It will also naturally highlight the last time file had its contents updated.

mtime = modification time
Last modification time shows time of the last change to file's contents. It does not change with owner or permission changes, and is therefore used for tracking the actual changes to data of the file itself.


ls -l & (a|c|m)time

ls -l default tells you the mtime of the file

# ls -l testfile
-rw-r--r--  1 root root    0 May 21 07:36 testfile

get the atime:

# ls -lu testfile
-rw-r--r-- 1 root root 0 May 21 07:54 testfile

get the ctime:

# ls -lc testfile
-rw-r--r--  1 root root    0 May 21 07:43 testfile