Command Line – Understanding the -alhF Flag in ls

command linelsoptions

What is the -alhF flag in ls? I can't find it in the man page.

Best Answer

From man ls:

   -a, --all
          do not ignore entries starting with .

   -F, --classify
          append indicator (one of */=>@|) to entries

   -h, --human-readable
          with -l, print sizes in human readable format (e.g., 1K 234M 2G)

   -l     use a long listing format

The command ls -alhF is equivalent to ls -a -l -h -F

The ability to combine command line arguments like this is defined by POSIX.

Options that do not require arguments can be grouped after a hyphen, so, for example, -lst is equivalent to -t -l -s.

Related Question