stat - display file or file system status

The stat command provides a complete rundown of the status of a file on the filesystem:

With no option, `stat’ reports all information about the given files. But it also can be used to report the information of the file systems the given files are located on. If the files are links, `stat’ can also give information about the files the links point to.

root@dell:~# stat hdd
File: `hdd’
Size: 384 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 1358293 Links: 1
Access: (0644/-rw-r–r–) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2010-01-10 17:00:07.000000000 +0530
Modify: 2009-08-01 09:08:16.000000000 +0530
Change: 2009-08-01 09:08:16.000000000 +0530

The results from the stat command show just about everything you’d want to know about the file being examined, even down the major and minor device numbers of the device where the file is being stored.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.