xref: /titanic_41/usr/src/lib/libast/common/man/fmtls.3 (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
.fp 5 CW .. .nr ;G \\n(.f .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" \\*(;G .. .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" ..

0

..

..

STRLS 3
NAME
fmtls - format file information in buffer
SYNOPSIS
.EX #include <ls.h> char* fmtls(char* buf, char* name, struct stat* st, char* info, char* link, int flags);
DESCRIPTION
.L fmtls formats ls (1) style file information into the buffer buf . A pointer to the trailing 0 in buf is returned. name is the file name. st is a pointer to the "struct stat status information for name obtained from one of the stat (2) routines. info is an additional string that will appear before name in buf and link is the name of the related hard or soft link file. Both info and link may be 0. flags controls the format style and may be a combination of the following:

LS_ATIME Use st->st_atime rather than st->st_mtime for LS_LONG .

LS_CTIME Use st->st_mtime rather than st->st_mtime for LS_LONG .

LS_BLOCKS List the number of blocks.

LS_INUMBER List the file serial number (inode number).

LS_LONG List the file mode, link count, user and group name, size or major/minor device number, and date along with the file name.

LS_MARK The file name is appended with .L / for directories, .L @ for symbolic links, and .L * for executable files.

LS_NOGROUP Omit the group name from LS_LONG .

LS_NOUSER Omit the user name from LS_LONG .

The user and group fields are each LS_W_NAME characters wide, the LS_INUMBER field is LS_W_INUMBER characters wide, and the LS_BLOCKS field is LS_W_BLOCKS characters wide.

"SEE ALSO"
ls(1), stat(2), strmode(3)