www.delorie.com/gnu/docs/findutils/find_27.html   search  
 
Buy GNU books!


Finding Files

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Print File Information

Action: -ls
True; list the current file in `ls -dils' format on the standard output. The output looks like this:

 
204744   17 -rw-r--r--   1 djm      staff       17337 Nov  2  1992 ./lwall-quotes

The fields are:

  1. The inode number of the file. See section 2.2.2 Hard Links, for how to find files based on their inode number.

  2. the number of blocks in the file. The block counts are of 1K blocks, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used. See section 2.4 Size, for how to find files based on their size.

  3. The file's type and permissions. The type is shown as a dash for a regular file; for other file types, a letter like for `-type' is used (see section 2.5 Type). The permissions are read, write, and execute for the file's owner, its group, and other users, respectively; a dash means the permission is not granted. See section 6. File Permissions, for more details about file permissions. See section 2.7 Permissions, for how to find files based on their permissions.

  4. The number of hard links to the file.

  5. The user who owns the file.

  6. The file's group.

  7. The file's size in bytes.

  8. The date the file was last modified.

  9. The file's name. `-ls' quotes non-printable characters in the file names using C-like backslash escapes.

Action: -fls file
True; like `-ls' but write to file like `-fprint' (see section 3.1 Print File Name).

Action: -printf format
True; print format on the standard output, interpreting `\' escapes and `%' directives. Field widths and precisions can be specified as with the printf C function. Unlike `-print', `-printf' does not add a newline at the end of the string.

Action: -fprintf file format
True; like `-printf' but write to file like `-fprint' (see section 3.1 Print File Name).

3.2.1 Escapes  
3.2.2 Format Directives  
3.2.3 Time Formats  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003