Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix stat command

Quick links

About stat
Syntax
Examples
Related commands
Linux / Unix main page

About stat

Display file or filesystem status.

Syntax

stat [OPTION] FILE...

-f, --filesystemdisplay filesystem status instead of file status
-c --format=FORMATuse the specified FORMAT instead of the default
-L, --dereferencefollow links
-t, --terseprint the information in terse form
--helpdisplay this help and exit
--versionoutput version information and exit

The valid format sequences for files (without --filesystem):

%AAccess rights in human readable form
%aAccess rights in octal
%BThe size in bytes of each block reported by `%b'
%bNumber of blocks allocated (see %B)
%DDevice number in hex
%dDevice number in decimal
%FFile type
%fRaw mode in hex
%GGroup name of owner
%gGroup ID of owner
%hNumber of hard links
%iInode number
%NQuoted File name with dereference if symbolic link
%nFile name
%oIO block size
%sTotal size, in bytes
%TMinor device type in hex
%tMajor device type in hex
%UUser name of owner
%uUser ID of owner
%XTime of last access as seconds since Epoch
%xTime of last access
%YTime of last modification as seconds since Epoch
%yTime of last modification
%ZTime of last change as seconds since Epoch
%zTime of last change

Valid format sequences for file systems:

%aFree blocks available to non-superuser
%bTotal data blocks in file system
%cTotal file nodes in file system
%dFree file nodes in file system
%fFree blocks in file system
%iFile System id in hex
%lMaximum length of filenames
%nFile name
%sOptimal transfer block size
%TType in human readable form
%tType in hex

Examples

stat index.htm

Output results similar to the example shown below.

 File: `index.htm'
Size: 17137 Blocks: 40 IO Block: 8192 regular file
Device: 8h/8d Inode: 23161443 Links: 1
Access: (0644/-rw-r--r--) Uid: (17433/comphope) Gid: ( 32/ www)
Access: 2007-04-03 09:20:18.000000000 -0600
Modify: 2007-04-01 23:13:05.000000000 -0600
Change: 2007-04-02 16:36:21.000000000 -0600

Related commands

ls

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope