EN
Bash - how to check file data?
10
points
1. It can be checked with stat command:
$ stat path/to/file
Example:
$ stat path/to/file
File: path/to/file
Size: 6 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 656476 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ my_user) Gid: ( 1000/ my_user)
Access: 2019-08-02 22:29:18.853867483 +0100
Modify: 2019-08-02 22:29:18.853867483 +0100
Change: 2019-08-02 22:29:18.853867483 +0100
Birth: -
2. Or with ls
command:
- atime - time of last access:
$ ls –lu
- mtime - time of last modification
$ ls –l
- ctime - time of last status change
$ ls –lc