The use of Linux stat command

The use of Linux stat command

  • What is the role of the stat command?

Display file or directory information, including: i-node node information, file size, type, access authority, last access time/modification time, etc. It can get ls -lmore information than commands .

You can check its man page for more information.

[root@node1 mysql]# stat relay-log.info 
    File: `relay-log.info'
    Size: 31  Blocks: 8    IO Block: 4096   regular file
    Device: 803h/2051d     Inode: 15735788  Links: 1
    Access: (0660/-rw-rw----)  Uid: (27/mysql)  Gid: (27/mysql)
    Access: 2016-10-20 12:15:59.039325669 +0800
    Modify: 2016-10-20 12:15:59.039325669 +0800
    Change: 2016-10-20 12:15:59.039325669 +0800

In the above example, we use the stat command to view the related information of the delayed log file relay-log.info generated in the mysql master-slave mode.

Guess you like

Origin blog.csdn.net/lx1848/article/details/77619840