Sunday, June 15, 2008

ls or the ll command?

Lets start our journey with the most basic command on any Unix ever, the ls command.

When I speak about something, I mean the practical part of it that I've been practicing for a while.

Regarding the ls command, I confess that I had to give up using it on Linux on it's basic format for a much better one, I'm using an advanced format that I've seen pretty much useful in many situations.

That format is:



ll is an alias in most Linux distributions that stands for:



So, instead of typing ls -l all the time, you just type: ll .


What does ls -l or ll do any way?

If you came across the file system of Linux, you already know the story of file permissions and modification, access and write dates, you must have known the other stuff that is only displayed using the long listing mode which is ls -l or ll.

What about the htr?

h
Stands for: Output in human readable format, the size for example would be in K or gigs or Tera accordingly.

t Sort most recently modified last. So you just look up to see the newest file in a directory.

r Reverse the sorting order, So you just look down to see the newest file in a directory.

So, This is my two cents using the ls command.

P.S: You can add the z option to see the SElinux contexts.




blog comments powered by Disqus