packages icon



 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



 NAME
      lft - list file types and

 SYNOPSIS
      lft [OPTIONS] [PATH] [FILE(S)]


 DESCRIPTION
      lft , list file types and summarize statistics.  This program was
      originally written out of frustration of having to use three different
      programs to get simple information such as, how many *.c files do I
      have, where are they and how much space do they occupy.  It has since
      been expanded to include numerous options to aid in locating and
      displaying files.

      The program is similar to ls in that it has options to display the
      files found in a short format (name only), long format (name plus
      other useful information), dereference symbolic links, sort the output
      and display files beginning with '.' among other things. It is similar
      to du in that it will display summary information for whatever it
      finds and similar to find in that it does a real recursive search.

      By default the program displays all files found grouped according to
      type. This can be reduced to specific files and/or types by giving a
      file specification and/or file type for the search.

      Note: This program only searches a single file system at a time.

      The program also makes use of an environment variable that allows you
      to customize the programs default behavior.

 OPTIONS
      Long options and/or their arguments may be abbreviated as long as they
      remain unique.

      -a, --all
           include names starting with '.' in search.
           Normally, files starting with a '.' are ignored because they are
           (usually) needed by the system and/or some program for it to work
           properly (which means you shouldn't mess with them, unless you
           know what your doing). Their existence and/or sizes are usually
           irrelevent.


           Note: The directories '.' and '..' are treated as hard links by
           this program.  They are not displayed as directories, as you
           might expect.





                                    - 1 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



      -e, --empty-dir
           list empty directories during recursive search.
           If this option is selected the full path to the directory will be
           displayed with "[EMPTY]" following it.


      -f, --find
           do a simple recursive search.
           If output is not directed to a terminal, this produces output
           suitable for input to xargs; otherwise it produces a simple
           listing of files found.


           Note: If top-down search direction is forced, only the topmost
           directory is searched.


      -k, --kilobytes
           display blocks in 1k byte blocks.
           This is the default unless the environment variable
           POSIXLY_CORRECT exists.

      -l, --long-format
           list names in long format.

      -L, --dereference
           dereference symbolic links.
           Display the link and where it points.

      -n, --names
           list names of files found.
           The file names of the type(s) specified will be listed by type.


      -o, --only-dot-files
           only search for files that start with '.'.


      -p, --posix-block-size
           display blocks in 512 byte blocks.
           This is the default if the environment variable POSIXLY_CORRECT
           exists.


      -r, --reverse
           reverse order while sorting.


      -R, --recurse[=OPTION]



                                    - 2 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



           recursive search [=top-down or bottom-up].
           If OPTION is given, it forces search direction.

           Note: If top-down is forced and the command line contains a file
           specification 'lft' will short-circuit and only search the
           topmost directory (this behavior is similar to the program ls.)


      -v, --vertical
           display filenames vertically.


      --color
           display in color if a tty.


      --debug[=OPTION]
           OPTION is none, all or recursive
           Debug is only available if lft was built with the debug option.
           When installing, run configure with the switch "--enable-debug"
           to allow debugging and to activate this option (the argument
           OPTION Turns on function tracing.)


      --help
           display help information and exit.


      --page
           display results a page at a time.
           At the prompt Continue?.  Entering 'y' + 'cr' or 'cr' (return)
           continues, anything else terminates the program.


      --sort[=OPTION]
           OPTION is fullname, basename, extension, size, slack or none


      --types=TYPES
           search for: (all if option not used)
           directory, executable, regular, hard-link, character-special,
           block-special, symbolic-link, orphan-link, multiplex, named-pipe,
           socket, unknown.

           Use this option to limit the search to only those file types
           given.  For example, 'lft --types=dir' , will only search for
           directories. If you want to search for more than one file type
           the argument must be in the form of a comma separated list. If
           you wanted to search for only directories, symbolic links and



                                    - 3 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



           sockets you would enter 'lft --types=directory,symbolic-
           link,socket'

           Note: The file types "executable" and "unknown" don't really
           exist, an executable file is a file with the execute bit(s) set
           and an unknown file is simply a file that doesn't fit any of the
           other catagories. However they, and any other pseudo file types,
           are considered to be distinct file types for the purposes of this
           program.  Also all of the file types may not be available on your
           system.  See the programs help message for a definitive list.


      --version
           display version information and exit.



 ENVIRONMENT VARIABLE
      ..._OPTIONS="..."

      Replace the elipses (from left to right) by the program name and the
      options you want in the environment variable.

      To change the default behavior of 'lft'.  The environment variable
      associated with it must be named LFT_OPTIONS. If you change the name
      of the program to 'foobar' then the environment variable must be named
      FOOBAR_OPTIONS. This allows you to have multiple versions of this
      program; Each with a different default behavior.  Options placed in
      the environment variable must be seperated by at least one '-', ';' or
      ' '.

      Only long options (those preceeded by '--') may be placed in the
      environment variable.


      EXAMPLES

      To add color to 'lft' create the following environment variable:

      LFT_OPTIONS="color"

      To add color, pagination and sort by extension to 'foobar' create the
      following environment variable:

      FOOBAR_OPTIONS="color page sort=ext"
      or
      FOOBAR_OPTIONS="color;page;sort=ext"
      or
      FOOBAR_OPTIONS="color-page-sort=ext"



                                    - 4 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



      The following is also allowed (though not recommended):

      FOOBAR_OPTIONS="--colo ;-;; page;- names-;-;-;-;kilo"

      An option may be abbreviated as long as it remains unique.


 OUTPUT EXAMPLES
      Note:

      Allocated
           The number of blocks used by the filesystem to contain this/these
           file(s).

      Occupied
           The number of blocks actually used by the file(s).

      Used The amount of space the file(s) occupy, expressed in kilobytes,
           megabytes or gigabytes.

      Slack
           The difference between 'Used' and 'Allocated' expressed as a
           percentage.

      Typing "lft /usr" (without the quotes) on a system that does not have
      the environment variable POSIXLY_CORRECT produces the following:

      /usr:

      File type/Total Found Allocated  Occupied      Used Slack
      Directory          20        38        38    38.00K  0.0%
      Executable          1         6         6     5.34K 11.1%
      Regular             1         5         5     4.56K  8.7%
      Symbolic link       7         0         0     0.00K  0.0%
      Directory Total    29        49        48    47.90K  2.2%

      Typing "lft /usr" (without the quotes) on a system that has the
      environment variable POSIXLY_CORRECT produces the following:

      /usr:

      File type/Total Found Allocated  Occupied      Used Slack
      Directory          20        76        76    38.00K  0.0%
      Executable          1        12        11     5.34K 11.1%
      Regular             1        10        10     4.56K  8.7%
      Symbolic link       7         0         0     0.00K  0.0%
      Directory Total    29        98        96    47.90K  2.2%

      Typing "lft -n /usr" (without the quotes) on a system that  has the



                                    - 5 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



      the environment variable POSIXLY_CORRECT produces the following:

      /usr:

      Directory:
      X11R6          bin            dict           doc
      etc            games          i486-gnu       i486-linux
      i486-linuxaout include        info           lib
      libexec        local          man            movemail-src
      openwin        sbin           share          src

      Executable:
      movemail

      Regular:
      XKeysymDB

      Symbolic link:
      Info           X11            X386           adm
      preserve       spool          tmp

      File type/Total Found Allocated  Occupied      Used Slack
      Directory          20        76        76    38.00K  0.0%
      Executable          1        12        11     5.34K 11.1%
      Regular             1        10        10     4.56K  8.7%
      Symbolic link       7         0         0     0.00K  0.0%
      Directory Total    29        98        96    47.90K  2.2%


 FILES

 SEE ALSO
      du, ls


 BUGS
      On BSD systems, block sizes reported are half the correct values for
      files that are NFS-mounted from HP-UX systems.  On HP-UX systems,
      block sizes reported are twice the correct values for files that are
      NFS-mounted from BSD systems.  This is due to a flaw in HP-UX; the
      programs ls and du are also affected.


 COPYING
      This manual and the software described by this manual is covered by
      the GNU General Public License, Version 2, June 1991, issued by :

           Free Software Foundation, Inc.,
           675 Mass Ave,



                                    - 6 -      Formatted:  December 26, 2024






 lft(1)                           Release 1                           lft(1)
 Linux System Manual                                     Linux System Manual

                                   10Aug97



           Cambridge, MA 02139, USA

      Permission is granted to make and distribute verbatim copies of this
      manual provided the copyright notice and this permission notice are
      preserved on all copies.

      Permission is granted to copy and distribute modified versions of this
      manual under the conditions for verbatim copying, provided that the
      entire resulting derived work is distributed under the terms of a
      permission notice identical to this one.

      Permission is granted to copy and distribute translations of this
      manual into another language, under the above conditions for modified
      versions, except that this permission notice may be included in
      translation instead of in the original English.

 MANUAL AUTHOR
      Jim Jackson
      School of Computer Studies
      University of Leeds The University of Leeds
      Leeds, LS2 9JT
      UK

      Email: jj@scs.leeds.ac.uk




























                                    - 7 -      Formatted:  December 26, 2024