STRLS(3)
okay bestie, welcome to the Library Functions Manual page for fmtls, aka STRLS(3) π
π NAME π
fmtls β format file information in buffer β¨
β¨ SYNOPSIS β¨
#include <ls.h>
char* fmtls(char* buf, char* name, struct stat* st, char* info, char* link, int flags);
π DESCRIPTION π
okay so fmtls formats ls(1)-style file information into the buffer buf. What you get back is a pointer to the trailing 0 in buf β literally the end of the string, bestie π«Ά.
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, no cap:
LS_ATIMEβ usest->st_atimerather thanst->st_mtimeforLS_LONG.LS_CTIMEβ usest->st_mtimerather thanst->st_mtimeforLS_LONG. (bestie the page literally saysst->st_mtimeinstead ofst->st_mtimeβ we keep it exactly as written π)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/for directories,@for symbolic links, and*for executable files.LS_NOGROUPβ omit the group name fromLS_LONG.LS_NOUSERβ omit the user name fromLS_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. Slay, the widths are locked in πβ¨.
π SEE ALSO π
and thatβs the STRLS(3) page, bestie β mwah π
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms