.\" $Id: stat.man,v 2.9 2012/11/08 15:08:41 ksb Exp $ .\" $Compile: Display%h .\" $Display: ${groff:-groff} -Tascii -man %f |${PAGER:-less} .\" $Display(*): ${groff:-groff} -T%s -man %f .\" $Install: %b -mDeinstall %o %f && cp %f $DESTDIR/usr/local/man/man1/stat.1 .\" $Deinstall: ${rm-rm} -f $DESTDIR/usr/local/man/[cm]a[nt]1/stat.1* .TH STAT 1 LOCAL .SH NAME stat - print inode contents .SH SYNOPSIS .ds PN "stat \fI\*(PN\fP [\fB\-1\fP] \fInodes\fP .br \fI\*(PN\fP \fB\-h\fP .br \fI\*(PN\fP \fB\-V\fP .SH DESCRIPTION .PP .I Stat prints out the contents of an inode as they appear to \fBstat(2)\fR in a human-readable format. .PP Here is a sample output from \fI\*(PN\fR: .nf File: \*(lq/\*(rq Size: 1024 Allocated Blocks: 2 Filetype: Directory Mode: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ system) Device: 0,0 Inode: 2 Links: 20 Access: Wed Jan 8 12:40:16 1986(00000.00:00:01) Modify: Wed Dec 18 09:32:09 1985(00021.03:08:08) Change: Wed Dec 18 09:32:09 1985(00021.03:08:08) .fi .PP Under the \fB\-1\fP flag the fields are output 1 per line to aid shell programmers that need to parse out various elements. Elements in this format might be more "user friendly" than "UNIX friendly": that is to say programs like \fBchmod\fP might not take the human version as input, but most humans can parse it that way. .SH OPTIONS .TP \fB\-1\fP Display only a single attribute in each line. The format changes a lot, but it is a lot easier to parse with pipe tools like \fBsed\fP(1). .TP \fB\-h\fP The standard ksb help text is displayed. .TP \fB\-V\fP Display a version string, only. .SH EXAMPLE .TP .nf \fBstat\fP \-1 /etc/motd |sed \-n \-e 's/^Device: *//p' .fi Extract the device attribute from the \fB/etc/motd\fP file's inode in a human readable format. .TP \fBstat\fP /etc/master.passwd Display the modes on the master password file. .SH BUGS Doesn't show \fBchattr\fP(2) or \fBchflags\fP(2) information. .\" or MAC stuff either --ksb .SH AUTHORS Rich Kulawiec, Purdue University .br KS Braunsdorf, stat at ksb Dot NPCGuild.org .SH BUGS The output is not entirely comprehensible. .SH "SEE ALSO" .hlm 0 stat(2), ls(1), chmod(1), touch(1), sed(1)