Using system tools – stat
While working on Linux, the most commonly used command is ls
, which gives a listing of the files in the specified directory. However, it shows only a little information about the files.
Instead, if we use the stat
command, we can get more information about the files/directories when compared to using ls
. Because stat
is able to get information about a file from its inode, it is able to give more information about the files.
Getting ready
Since stat
is an built-in command of Linux, nothing else needs to be installed so that we can use it.
How to do it...
This section will explain about the options and usage of the stat
" command. By using stat
, we can get a detailed status of a particular file or file system.
- Suppose we have a file called
example.txt
. When we do a long-listing of this file using thels -l
command, we get information about the file which includes information about when the file was last modified.
However, when we use the stat
command to check details about...