Access: This access is about access timestamp (last time the file was accessed), also called atime.Gid: Group id and group name of the file owner.Uid: User id and the user name of the file owner.Access: File permissions in absolute mode and symbolic mode.Links: Number of hard links to the file.Device: The device number (ID of the hard drive) in hexadecimal and decimal.File type: It could be file, directory, link, sockets.Blocks: Number of filesystem blocks the file needs on the disk.Here’s a sample output if you use the stat command without any options: stat sample.txt Using stat command to get file information -t : Terse mode prints the information in a single line.-L : Follow symbolic links and show information on the file they point to.-f : Show the information for the filesystem instead of the file.There are only a few options with stat command: It can also display information on the filesystem, instead of the files. The stat command lists important attributes of files and directories. What if I told you there is a better way to check file attributes? It’s a simple but useful command called stat.
Most people use the ls command with option -l to check permission on a file in Linux.