Home Explore Blog CI



man-pages

17th chunk of `find.man`
284810321aa572d60f2b77258f2124340e2b1091114802560000000100000fe0
 fractional part in the seconds field.

                     d      day of month (01..31)

                     D      date (mm/dd/yy)

                     F      date (yyyy‐mm‐dd)

                     h      same as b

                     j      day of year (001..366)

                     m      month (01..12)

                     U      week number of year with Sunday as first day of week (00..53)

                     w      day of week (0..6)

                     W      week number of year with Monday as first day of week (00..53)

                     x      locale’s date representation (mm/dd/yy)

                     y      last two digits of year (00..99)

                     Y      year (1970...)

              %b     The amount of disk space used for this file in 512‐byte blocks.  Since disk space is allocated in multiples of the filesystem block size this is usually greater than %s/512, but it can also be smaller if
                     the file is a sparse file.

              %Bk    File’s  birth  time, i.e., its creation time, in the format specified by k, which is the same as for %A.  This directive produces an empty string if the underlying operating system or filesystem does not
                     support birth times.

              %c     File’s last status change time in the format returned by the C ctime(3) function.

              %Ck    File’s last status change time in the format specified by k, which is the same as for %A.

              %d     File’s depth in the directory tree; 0 means the file is a starting‐point.

              %D     The device number on which the file exists (the st_dev field of struct stat), in decimal.

              %f     Print the basename; the file’s name with any leading directories removed (only the last element).  For /, the result is ‘/’.  See the EXAMPLES section for an example.

              %F     Type of the filesystem the file is on; this value can be used for -fstype.

              %g     File’s group name, or numeric group ID if the group has no name.

              %G     File’s numeric group ID.

              %h     Dirname; the Leading directories of the file’s name (all but the last element).  If the file name contains no slashes (since it is in the current directory) the %h specifier expands to  ‘.’.   For  files
                     which are themselves directories and contain a slash (including /), %h expands to the empty string.  See the EXAMPLES section for an example.

              %H     Starting‐point under which file was found.

              %i     File’s inode number (in decimal).

              %k     The  amount  of  disk space used for this file in 1 KB blocks.  Since disk space is allocated in multiples of the filesystem block size this is usually greater than %s/1024, but it can also be smaller if
                     the file is a sparse file.

              %l     Object of symbolic link (empty string if file is not a symbolic link).

              %m     File’s permission bits (in octal).  This option uses the ‘traditional’ numbers which most Unix implementations use, but if your particular implementation uses an unusual  ordering  of  octal  permissions
                     bits,  you will see a difference between the actual value of the file’s mode and the output of %m.  Normally you will want to have a leading zero on this number, and to do this, you should use the # flag
                     (as in, for example, ‘%#m’).

              %M     File’s permissions (in symbolic form, as for ls).  This directive is supported in findutils 4.2.5 and later.

              %n     Number of hard links to file.

              %p     File’s name.

              %P     File’s name with the name of the starting‐point under which it was found removed.

              %s     File’s size in bytes.

              %S     File’s sparseness.  This is calculated as (BLOCKSIZE*st_blocks / st_size).  The exact value you will get for an ordinary file of

Title: find: -printf Format Directives (File Metadata)
Summary
This section continues the description of the `-printf` format directives for the `find` command, focusing on directives that display file metadata. It covers the date format specifiers (d, D, F, h, j, m, U, w, W, x, y, Y), disk space usage in 512-byte blocks (%b), file birth time (%Bk), file status change time (%c, %Ck), file depth (%d), device number (%D), basename (%f), filesystem type (%F), group name and ID (%g, %G), dirname (%h), starting point (%H), inode number (%i), disk space usage in 1KB blocks (%k), symbolic link target (%l), permission bits in octal and symbolic form (%m, %M), number of hard links (%n), file name (%p), file name without starting point (%P), file size in bytes (%s), and file sparseness (%S).