LS(1)

πŸ“¦ version 1.053, in alpine 3.24

πŸ’– LS(1) β€” list file/directory information πŸ’–

Hey bestie! Welcome to the LS(1) page from the User Contributed Perl Documentation. This is the whole manual, but make it make sense. πŸ’…

πŸ”₯ option override rules (read these first) πŸ”₯

Okay so these options are lowkey fighting for the same spot, and the last one you say wins:

  • The -1, -C, -x, and -l options all override each other; the last one specified determines the format used.
  • The -c, -u, and -U options all override each other; the last one specified determines the file time used.
  • The -S and -t options override each other; the last one specified determines the sort order used.
  • The -B, -b, -w, and -q options all override each other; the last one specified determines the format used for non-printable characters.
  • The -H, -L and -P options all override each other (either partially or fully); they are applied in the order specified.

✨ NAME ✨

ls β€” list file/directory information

🌸 SYNOPSIS 🌸

ls [-1ACFLRSTWacdfgiklmnopqrstux] [file ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this program lists information about files and directories. If it is invoked without file/directory name arguments, it lists the contents of the current directory. Otherwise, ls lists information about the files and information about the contents of the directories (but see -d). Furthermore, without any option arguments ls just lists the names of files and directories. All files are listed before all directories. The default sort order is ascending ASCII on filename.

πŸ’… OPTIONS πŸ’…

The BSD options "1ACFLRSTWacdfgiklmnopqrstux" are recognized, but only "1RSacdfiklnrstu" are implemented:

  • -1 β€” list entries 1 per line (default if output is not a tty). This is disabled by any of -C, -x, or -l.
  • -R β€” recursively list the contents of all directories, breadth-first.
  • -S β€” sort descending by size. This is disabled by -t.
  • -a β€” list all files (normally files starting with . are ignored).
  • -c β€” sort by descending last modification time of inode. This is disabled by any of -u or -U.
  • -d β€” do not list directory contents.
  • -f β€” do not sort -- list in whatever order files/directories are returned by the directory read function. This option implies -a.
  • -i β€” list file inode number. (Doesn't mean much on non-inode systems.)
  • -k β€” when used with -s, list file/directory size in 1024-byte blocks.
  • -l β€” long format listing of mode -- # of links, owner name, group name, size in bytes, time of last modification, and name.
  • -n β€” list numeric uid and gid (default on platforms without getpwuid()).
  • -r β€” reverse sorting order.
  • -s β€” list file/directory size in 512-byte blocks. (May not mean much on non-Unix systems.)
  • -t β€” sort by descending last modification time.
  • -u β€” sort by descending last access time.
  • -w β€” set the column width for the output. The default is the window size, or 80 if the program cannot determine the window size. A column width of 0 means unlimited.

🌈 ENVIRONMENT 🌈

The working of ls is not influenced by any environment variables. Like, not one. It's giving independent main character energy. ✨

πŸ’€ BUGS πŸ’€

The file metadata from stat is used, which may not necessarily mean much on non-Unix systems. Specifically, the uid, gid, inode, and block numbers may be meaningless (or less than meaningful at least). 😭

The -l option does not yet list the major and minor device numbers for special files, but it does list the value of the 'dev' field as 2 hex 16-bit words. Doing this properly would probably require filesystem type probing.

πŸŽ€ AUTHOR πŸŽ€

This Perl implementation of ls was written by Mark Leighton Fisher of Thomson Consumer Electronics, fisherm@tce.com.

Portions of Stat::lsmode from Mark Jason Dominus have been inlined into this program uder the perl license. See <http://www.plover.com/~mjd/perl/lsMode/>.

This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.


Alright bestie, that's the whole LS(1) manual page β€” signing off from the User Contributed Perl Documentation crew with perl v5.42.2, dated 2026-02-15. Stay slay, list responsibly, and remember: last override wins, periodt. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from