Man Linux: Main Page and Category List


       limo - 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:

              Format of the output (-f)
                     Which "chunks" of information to  output  for  each  file
                     (default is just the filename).

              Ordering of the output (-o)
                     (default is ordered ascending by filename).

              Printing style (-p)
                     (default is ordered down columns and then across, like ls


                     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

                      n      the filename

                      N      the   filename   with  a  character  appended  to
                             indicate the file type  (/=directory,  @=symbolic
                             link,  |=pipe,  &=char  special, #=block special,

                      +      prefix to n or N; if a symbolic link,  the  name,
                             then  ->  then  the  target,  otherwise  just the

                     Note that when using ’%’ syntax,  you  must  do  it  like


                     not like this:


                      d      short description of the type of the  file,  e.g.
                             "Dir" or "ChSp"

                      D      long  description  of  the type of the file, e.g.
                             "Directory" or "Character special"

                      b      file size in blocks (whatever a block is for  the
                             current filesystem)

                      s      file  size  in bytes, in short (4-character) form
                             (b=bytes, K=kilobytes, M=megabytes, G=gigabytes)

                      S      file size in bytes, in long form,  or  the  major
                             and  minor device nodes if a block- or character-
                             special device

                      p      protection mode, 6 octal digits

                      P      protection mode, long form (e.g. -rwxr-xr-x)

                      e      effective 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"

                      u      UID of owner

                      U      username of group, or UID of owner if none

                      g      GID of owner

                      G      group name of group, or GID of group if none

                      i      inode number

                      l      number of hard links

                      a      time of last access, short (5-character) form; if
                             < 24 hours old, HH:MM; if < 12 months old, DDMMM;
                             if < 50 years, MMMYY; otherwise YYYY

                      A      time of last access, long form;  Day-DD-MMM-YYYY-

                      m      time of last modification, short form

                      M      time of last modification, long form

                      c      time of last change, short form

                      C      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

                      -      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

                     for amc, shows:
                             if  <  60  minutes, MMmSS; for < 24 hours, HHhMM;
                             for < 100 days, DDdHH; else DDDd

                     for AMC, shows:

                     for a future timestamp:
                             the format is preceded by ’+’

                     mixing ’-’ and ’=’
                             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

                     Note  that  when  using  ’%’  syntax, you must do it like


                     not like this:.


                             custom command output (see the -e option)

                     order output, select any or all of

                      +      sort the following chunks ascending (default)

                      -      sort the following chunks descending

                      n      filename (default)

                      b      number of blocks

                      s      number of bytes

                      d      file  type part of the file protection mode (that
                             is, directory, character  special,  normal  file,

                      p      full file protection mode (probably silly)

                      u      UID

                      U      Username of owner

                      g      GID

                      G      Group name of group owner

                      i      inode number

                      a      time of last access

                      m      time of last modification

                      c      time 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)

                     print style, one of:

                      a      list across rows

                      d      list 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 ".."

                     use  the  appropriate  timestamps  of  the   compare-file
                     instead  of  the current system time when displaying file

              -d     for directories, show their information rather than their

                     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


              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

              -q     display unprintable characters in filenames as ’?’

              -R     recursively list subdirectories

              -r     recursively list  subdirectories,  but  do  not  traverse

              -s     approximate  the  behaviour of "ls -s" by setting "-f sn"
                     (or whatever is in LIMO_FORMAT_S; see ENVIRONMENT)

                     set the default chunk separator character (default  is  a

              -v     verbose mode; explain a few things along the way

                     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

                     force output to  be  in  the  given  number  of  columns,
                     regardless of screen width

              -/     display full pathnames of files


                     the default output format, overridden by -f

                     output format used with the -l switch

                     the default output format, overridden by -f

                     the default output order, overridden by -o

                     the default printing style, overridden by -p

                     column  width  to  use for output, if attempts to find it
                     fail (default 80)


       The behavior of limo reflects the preferences of the  author.  For  the
       most  part  it emulates the general behaviour of ls but departs from it
       in some respects:

                     output is identical whether  writing  to  a  terminal  or
                     other  file  (by default ls turns multi-column output off
                     when not writing to a terminal)

              colour limo does not support ANSI colouring of  files  based  on
                     their  type;  the  author hates that (but is slowly being
                     argued into implementing it anyway)

              -q     character   quoting   is    simplistic,    and    assumes

              custom commands (-e)
                     option  is  bordering  on  the baroque, and puts limo one
                     step away from being able to read mail


       ls(1); chdir(2); ioctl(2);  lstat(2);  readlink(2);  fork(2);  pipe(2);
       execv(3); qsort(3); strftime(3)


       Fraser McCrossan <>

                         $Date: 2000/01/24 00:37:32 $                  LIMO(1)