DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T f

⟦8de9274ea⟧ TextFile

    Length: 2752 (0xac0)
    Types: TextFile
    Names: »fls.man«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/doc/fls.man« 

TextFile

FLS(1WI)                    UNIX User's Manual    Created: 6 September 1985

NAME
     fls - formatted listing of file statistics

USAGE
     _▶08◀f_▶08◀l_▶08◀s format [files]

FORMATS
     The following is the summary that is printed by _▶08◀f_▶08◀l_▶08◀s when the %? format
     is used.

     Summary of % formats:
     xX   means that both integer (x) & string (X) formats supported
     All formats support %-p.wX where:
          - is an optional sign to left-justify X
          p is an optional pad of white spaces
          w is an optional maximum width of X
     _▶08◀C_▶08◀h_▶08◀a_▶08◀r _▶08◀M_▶08◀e_▶08◀a_▶08◀n_▶08◀i_▶08◀n_▶08◀g:
     ?    print this list of formats
     %    insert %
     aA   access time
     cC   change time
     gG   group id
     i    inode number
     l    number of links
     mM   modification time
     n    insert a newline
     N    file name
     pP   protection modes
     s    size
     t    insert a tab
     T    file type
     uU   user id

DESCRIPTION
     _▶08◀f_▶08◀l_▶08◀s gets information about the named files and allows its display in a
     variety of formats.  The formats are based on the formatted printing
     routines used in C programming, like the newer versions of the _▶08◀d_▶08◀a_▶08◀t_▶08◀e
     program.  The program is design to be used in shell scripts.

EXAMPLES
     # check user's mail file: cm
     set -- `fls "%m %a %s %A" $MAIL`
     modifytime=$1
     accesstime=$2
     size=$3
     shift 3
     if [ "$size" != 0 ]
     then
          if test $modifytime -gt $accesstime
          then
               echo "You have new mail ($size bytes) Last read $*"
          else
               echo "You have old mail ($size bytes) Last read $*"
          fi
     else
          echo "You have no mail.  Last read $*"

     A fast long _▶08◀l_▶08◀s format with numbers, and one with strings:
     fls "%.1T%9P %2l %-10U %-10G %7s %-.10M %N"
     fls "%.1T%3p %2l %10u %10g %7s %-.10M %N"

     A detailed tabular format:
     fls "%n%N:
          Last Accessed: %.24A
          Last Modified: %.24M
          Owner/Group:   %-10U %G
          File Type:     %T
          Protections:   %P %p
          Size:          %s
          Inode:         %i
          Links:         %l"

     Save the file protections, change them, and reset:
     oldmode=`fls %p $file`
     chmod 777 $file
     do_something_to $file
     chmod $oldmode $file

SEE ALSO
     sh(1), ls(1), stat(2), printf(3)

SYNTAX FOR PROGRAMMERS
     The program source contains a function that can be called directly.  A
     null file name can be used to test the format string.

     fls (file, format, buffer)
     char *file;    /* name of the file to be listed */
     char *format;  /* format string */
     char buffer[]; /* buffer large enough to hold answer */

AUTHOR
     Gary Perlman