LIMO_FORMAT
the default output format, overridden by -f
List files with many options
limo [-o<ordering>]
[-p<print
style>]
[-
[wW]
<display
width>]
[-c<compare
file>]
[-f<output
format>]
[-aAdhlRsv]
[file ...]
li [-o<ordering>]
[-p<print
style>]
[-
[wW]
<display
width>]
[-c<compare
file>]
[-f<output
format>]
[-aAdhlRsv]
[file ...]
limo is a replacement for ls with some knobs on. By default, it is installed as both limo and as li. It tries to give far more control over the output format than ls and has simpler and more straightforward (albeit more verbose) options.
It is probably most suited to system administrators who need to know file attributes very precisely, and to script writers, who wish to avoid parsing ls output. For those who need to extract the same information in C programs, a list of the more interesting system and C library calls used by limo is in the SEE ALSO section.
The options basically specify three aspects of the output:
Which "chunks" of information to output for each file (default is just the filename).
(default is ordered ascending by filename).
(default is ordered down columns and then across, like ls ).
-f<format>where format is either a string of any or all of the following chunk characters, in any order, or a string in a format reminiscent of print(), where chunk characters are preceded by the '%' character, and everything else is repeated verbatim, e.g. "Psn" and "%P %s %n" are equivalent:
nthe filename
the filename with a character appended to indicate the file type (/=directory, @=symbolic link, |=pipe, &=char special, #=block special, :=socket)
prefix to n or N; if a symbolic link, the name, then -> then the target, otherwise just the filename
dshort description of the type of the file, e.g. "Dir" or "ChSp"
long description of the type of the file, e.g. "Directory" or "Character special"
bfile size in blocks (whatever a block is for the current filesystem)
sfile size in bytes, in short (4-character) form (b=bytes, K=kilobytes, M=megabytes, G=gigabytes)
file size in bytes, in long form, or the major and minor device nodes if a block- or character-special device
pprotection mode, 6 octal digits
protection mode, long form (e.g. -rwxr-xr-x)
eeffective permission (i.e. whichever one of the above long permission triplets applies to the current user); in the above example if the user owned the file, would print "rwx" else would print "r-x"
uUID of owner
username of group, or UID of owner if none
gGID of owner
group name of group, or GID of group if none
iinode number
lnumber of hard links
atime of last access, short (5-character) form; if < 24 hours old, HH:MM; if < 12 months old, DDMMM; if < 50 years, MMMYY; otherwise YYYY
time of last access, long form; Day-DD-MMM-YYYY-HH:MM:SS
mtime of last modification, short form
time of last modification, long form
ctime of last change, short form
time of last change, long form
modify the next a, A, m, M, c or C chunk to show the raw timestamp (i.e. the number of seconds since the epoch) rather than a formatted timestamp
-modify the next a, A, m, M, c or C chunk to show the file age compared to the current system date (or compare-file date if the -c option is used), instead of the absolute timestamp
if < 60 minutes, MMmSS; for < 24 hours, HHhMM; for < 100 days, DDdHH; else DDDd
DDDd-HH:MM:SS
the format is preceded by '+'
will work, giving you the raw comparison in seconds rather than the formatted version; slightly confusingly, formatted versions are prefixed with + if younger, or nothing if older, whilst raw versions are prefixed with - if older, nothing with younger
0123456789custom command output (see the -e option)
-o<sort-chunks>order output, select any or all of
sort the following chunks ascending (default)
-sort the following chunks descending
nfilename (default)
bnumber of blocks
snumber of bytes
dfile type part of the file protection mode (that is, directory, character special, normal file, etc.)
pfull file protection mode (probably silly)
uUID
Username of owner
gGID
Group name of group owner
iinode number
atime of last access
mtime of last modification
ctime of last change
For example, "-od-Un" orders ascending by file type, then descending by owner name then file name. If you specify "-o+" or "-o-" (that is, no sort chunks, just a direction), no ordering is performed, files will be listed in the order they appear in the directory.
Ordering is performed by qsort(3)
-p[ad,]
print style, one of:
alist across rows
dlist down columns (default)
list comma-separated
-a
show all files, even those beginning with a "."
-A
show all files, even those beginning with a ".", except for "." and ".."
-c<compare-file>use the appropriate timestamps of the compare-file instead of the current system time when displaying file ages
-d
for directories, show their information rather than their contents
-e<line:word:command>specify a command to extract custom information about a file; limo will capture the command's output, and use the given word on the given line (stripped of whitespace) with word 0 taken to mean the whole line; the first -e option may be accessed using the 0 (zero) chunk, and subsequent ones with 1, 2, 3, up to 9
Example:
limo -e "1:1:wc -l" -f P0n
will list each file with its permissions and line count, and
limo -e "1:0:file -b" -f 0sn will show the file's content type, size and name.
If you need the filename supplied to the command anywhere other than at the end, place "%s" in the command. If you don't quote the %s with single quotes, limo will do it for you. If the command returns a non-zero exit status (for example, wc on a directory), you'll only get "-". Be aware that this option carries a heavy performance penalty.
-h
show usage information and list of available chunks
-l
approximate the behaviour of "ls -l" by setting "-f PlUGSm+n" (or whatever is in LIMO_FORMAT_L; see ENVIRONMENT)
-q
display unprintable characters in filenames as '?'
-R
recursively list subdirectories
-r
recursively list subdirectories, but do not traverse filesystems
-s
approximate the behaviour of "ls -s" by setting "-f sn" (or whatever is in LIMO_FORMAT_S; see ENVIRONMENT)
-S<character>set the default chunk separator character (default is a space)
-v
verbose mode; explain a few things along the way
-w<width>assume a display width of width this overrides the default determination of the screen width, which is (1) whatever ioctl(1, TIOCGWINSZ) says; (2) whatever the COLUMNS environment variable says; finally (3) 80
-W<columns>force output to be in the given number of columns, regardless of screen width
-/
display full pathnames of files
LIMO_FORMAT
the default output format, overridden by -f
LIMO_FORMAT_L
output format used with the -l switch
LIMO_FORMAT
the default output format, overridden by -f
LIMO_ORDER
the default output order, overridden by -o
LIMO_STYLE
the default printing style, overridden by -p
COLUMNS
column width to use for output, if attempts to find it fail (default 80)
5 releases since Debian 2.2 (Potato); the text changed 2 times.
-/ since Debian 3.0 (Woody);
-A since Debian 3.0 (Woody);
-r since Debian 3.0 (Woody).