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