%Z The time of last change, seconds since Epoch.įor more command options, use the –help option with stat command as shown.%z This is the time of last change, human-readable.%Y Prints the time of last modification, seconds since Epoch.%y Displays the last time of last modification, human-readable.%X The time of last access, seconds since Epoch.%x The time of last access, human-readable.%W Prints the time of file birth, seconds since Epoch 0 if unknown.%w Reveals the time of file birth, human-readable – if unknown.%T minor device type in hex, for character/block device special files.%t major device type in hex, for character/block device special files.%o Prints the optimal I/O transfer size hint.%N Shows quoted file name with dereference if symbolic link.%f Displays the raw mode in hexadecimal.%D The device number in hexadecimal format.%d Displays the device number in a decimal format.%C Shows the SELinux security context string.%B the size in bytes of each block reported by %b.%b This is the number of blocks allocated (see %B).%A Displays the access rights in a human readable format.%a Displays the access rights in octal format.Here’s a complete list of the format sequences that you can use: The –format option prints out a new line without requiring an additional operand. To display access rights and uid (User ID) use the %a and %u format sequences. Popular expressions used to custom the output include –printf or –format optionįor example, to display inode of a file only, use the %i format sequence as shown.
![how to use stat transfer linux how to use stat transfer linux](https://stattransfer.com/wp-content/uploads/2019/09/pb.jpg)
If you want specific information, you can custom the output using a format sequence to provide exactly what you need and leave other details. This is because we passed it as an argument with the stat command.įrom previous examples, we have seen that stat command prints out a barrage of information on the terminal. This now displays information about the file and not the link, even though the output suggests it’s the link. $ stat -L /usr/share/zoneinfo/America/Cayman To get information on the file that the links points to, use the -L option also known as the dereference option. In the example above, the symbolic link /usr/share/zoneinfo/America/Cayman points to ( ->) Panama. $ stat /usr/share/zoneinfo/America/Cayman Take for example the /usr/share/zoneinfo/America/Cayman symbolic link. Usually, if you run the stat command on a symbolic link, it will only give you information about the link, and not the file that the link points to. The -t option is used to display information in a terse format as shown: $ stat -t file1.txt This gives you the block size, total & available memory to mention just a few attributes. You can check the filesystem status where the file is sitting on by using the -f option as shown.
![how to use stat transfer linux how to use stat transfer linux](https://windows-cdn.softpedia.com/screenshots/thumbs/Stat-Transfer-thumb.png)
You can view a detailed report on multiple files by specifying the files on the command line one after the other as shown. Change : Shows the last time a file’s metadata e.g permissions & ownership was changed.Modify : Shows the last time the contents of the file were changed.Access : Shows the last time the file was accessed.File type : Shows what type the file is (Whether a regular file, symbolic link etc).Access : File permissions either in symbolic or numeric format.
![how to use stat transfer linux how to use stat transfer linux](https://i.shareappscrack.com/uploads/2019/11/56135ff3-288d-4196-85a5-23e66c6dec81.jpg)