bug-findutils
[Top][All Lists]
Advanced

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

Re: [Non-DoD Source] Re: Please advise work around or bug fix


From: Bob Proulx
Subject: Re: [Non-DoD Source] Re: Please advise work around or bug fix
Date: Thu, 25 Mar 2021 14:36:34 -0600

Yuen, Kam-Kuen CIV USARMY DEVCOM SC (USA) wrote:
>  But I try the following and has the attached sample output.
>    
>  find . -size +1k -ls
> 
> Q) Where can I find the columns heading? The standard ls command does not 
> have the first two columns data.
> Is there a good documentation that I can use as reference guide?

The excellent find manual contains this information. :-)

I will quote the find documentation but since -ls is like "ls -dils"
then looking at the "ls" documentation for those options would also
provide the same information. :-)

The "ls -i" part adds the inode number of the file to the first
column.  That's the extra first column.  The "ls -s" adds the size.
That's the extra second second column.  You should already be familiar
with -s since you used it in your description.  The rest of the
columns are due to the "ls -l" option.

I read the manual locally.  (I use Emacs for this but of course it is
available from the command line too.)  The canonical tool is "info"
but if you are a vim (or vi) user then you may find the default key
bindings for the "pinfo" command more intuitive.  You may need to
install pinfo (or info too) but doing so is well worth it to have all
of the documentation available.

    $ pinfo find

But regardless it is also available on the web.  This is the latest
upstream documentation and may be newer than what an OS installs
locally.

    
https://www.gnu.org/software/findutils/manual/html_node/find_html/Print-File-Information.html#Print-File-Information

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.  *Note 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.  *Note Size::,
          for how to find files based on their size.

       3. The file's type and file mode bits.  The type is shown as a
          dash for a regular file; for other file types, a letter like
          for '-type' is used (*note Type::).  The file mode bits are
          read, write, and execute/search for the file's owner, its
          group, and other users, respectively; a dash means the
          permission is not granted.  *Note File Permissions::, for more
          details about file permissions.  *Note Mode Bits::, for how to
          find files based on their file mode bits.

       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.  This may change
          soon, as the treatment of unprintable characters is harmonised
          for '-ls', '-fls', '-print', '-fprint', '-printf' and
          '-fprintf'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]