I have seen that people use ls -alh in the Linux terminal. However, when I see the manual, I don't see -alh (i.e. when I type man ls).

Why do I not have it in the manual? Can someone explain what it does?

  • 2
    Personally, I prefer ls -lhA which is the same as -lha except that it excludes . and ... – Bryan Field Jul 8 '16 at 17:56

ls -alh is the same as ls -a -l -h.

Multiple short options can be combined like this.

Here are the meanings of those options from man ls:

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

    use a long listing format 

-h, --human-readable
    with -l, print sizes in human readable format (e.g., 1K 234M 2G) 
  • 1
    Why would I need human readable? I don't see any differences in the size of the font input... – Pichi Wuana Jul 8 '16 at 11:12
  • 3
    @PichiWuana The size of the files and directories are printed in a human readable form, and not in bytes (which may be hard to parse if they are big numbers). – Kusalananda Jul 8 '16 at 11:15
  • 12
    @PichiWuana human readable is not about the font size. It's about printing 1M instead of 1048576 when listing a file of one megabyte. – terdon Jul 8 '16 at 11:15
  • 2
    Ohhh.... I understand now. – Pichi Wuana Jul 8 '16 at 11:16
  • 4
    Of course, I prefer to use ls -hal for HAL9000-readable. – Kevin Jul 9 '16 at 1:33

-h stands for human readable.

As mentioned in the comment, you can combine arguments simply like: -alh. The order is irrelevant.

From man ls:

   -h, --human-readable
          with -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)
  • Do you mean that ls -a -l -h is equal to ls -alh? – Pichi Wuana Jul 8 '16 at 11:10
  • @PichiWuana exactly, you can combine arguments like that. – Jacob Vlijm Jul 8 '16 at 11:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.