Walt Mankowski on Wed, 19 Feb 2003 15:58:07 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Incremental Backups to CD-RW


On Wed, Feb 19, 2003 at 09:14:25AM -0500, gabriel rosenkoetter wrote:
> On Wed, Feb 19, 2003 at 07:16:53AM -0500, Paul wrote:
> > I don't have anything to add, but I did learn about "stat" as a result 
> > of this thread.
> > 
> > stat filename
> > stat -c "%y  %n" *
> > 
> > I was wondering how to find modification and access times.
> 
> Where are you using a -c flag? That doesn't seem to be in the
> stat(1) that ships with Red Hat 7.3.

I'm running GNU stat 4.5.2 under Debian testing.  Here are the
relevant parts of stat's man page concerning the -c flag, reformatted
for ease of reading:

  -f, --filesystem
         display filesystem status instead of file status

  -c --format=FORMAT
         use the specified FORMAT instead of the default

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

         %A - Access rights in human readable form
         %a - Access rights in octal
         %b - Number of blocks allocated
         %D - Device number in hex
         %d - Device number in decimal
         %F - File type
         %f - raw mode in hex
         %G - Group name of owner
         %g - Group ID of owner
         %h - Number of hard links
         %i - Inode number
         %N - Quoted File name with dereference if symbolic link
         %n - File name
         %o - IO block size
         %s - Total size, in bytes
         %T - Minor device type in hex
         %t - Major device type in hex
         %U - User name of owner
         %u - User ID of owner
         %X - Time of last access as seconds since Epoch
         %x - Time of last access
         %Y - Time of last modification as seconds since Epoch
         %y - Time of last modification
         %Z - Time of last change as seconds since Epoch
         %z - Time of last change

  Valid format sequences for file systems:

         %a - Free blocks available to non-superuser
         %b - Total data blocks in file system
         %c - Total file nodes in file system
         %d - Free file nodes in file system
         %f - Free blocks in file system
         %i - File System id in hex
         %l - Maximum length of filenames
         %n - File name
         %s - Optimal transfer block size
         %T - Type in human readable form
         %t - Type in hex

Attachment: pgpsjVcqhXtEF.pgp
Description: PGP signature