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.
Long options and/or their arguments may be abbreviated as long as they remain unique.
..._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:
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"
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.
Note:
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 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%
This manual and the software described by this manual is covered by the GNU General Public License, Version 2, June 1991, issued by :
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.
Email: jj@scs.leeds.ac.uk