Difference between ls -l and ll?

I'm relatively new to programming as a whole and some tutorials have been telling me to use ls -l to look at files in a directory and others have been saying ll. I know that ls is a short list, but is there a difference between the other two?

1

2 Answers

This is located in your .bashrc:

alias ll='ls -al'

By taking a look at the manual pages for the command ls, you can see what those two attributes accomplish together:

  1. -a: do not ignore entries starting with ..
  2. -l: use a long listing format.

So you can understand that ls -l would ignore any entry starting with .. That's their only difference.

EDIT:

Let me note, that, as commented, the ll alias differs from installation to installation. In case you are wondering what's yours, please open up a terminal and enter:

alias ll

This will show you how ll is set. You can then look up the additional attributes by typing:

man ls
8

ll is a common alias for ls -l. It is a part of the default .bashrc, with a couple more options:

$ grep 'alias ll' /etc/skel/.bashrc
alias ll='ls -alF'

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like