Stat

From Linuxintro
Revision as of 11:43, 25 September 2011 by imported>ThorstenStaerk (Reverted edits by 208.91.157.147 (talk) to last revision by ThorstenStaerk)

stat is a command to give you information about a file or a file system:

# stat /bin/bash
  File: `/bin/bash'
  Size: 606864        Blocks: 1192       IO Block: 4096   regular file
Device: fd01h/64769d  Inode: 298         Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-03-13 17:45:01.125355234 -0500
Modify: 2009-12-10 10:54:38.000000000 -0500
Change: 2010-03-12 17:36:31.008003988 -0500

For a file system:

# stat -f /
  File: "/"
    ID: 75c8317e0d608bbd Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 240356010  Free: 224199424  Available: 211990025
Inodes: Total: 61054976   Free: 60704423

See also