Announcement

Collapse
No announcement yet.

Question about ls: what do the letters stand for?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about ls: what do the letters stand for?

    I have been using Linux for a while now, but I still have so many things to learn about it, including the basics!

    My question is, what do these letters, numbers, and dashes stand for? (eg. drwxr-xr-x 2)

    james@casino-royale:/etc$ ll | tail
    -rw-r--r-- 1 root root 805 2006-06-29 17:59 updatedb.conf
    -rw-r--r-- 1 root root 48 2006-12-25 17:51 usplash.conf
    drwxr-xr-x 2 root root 4.0K 2007-03-09 10:11 vim
    drwxr-xr-x 2 root root 4.0K 2007-01-22 23:13 w3m
    -rw-r--r-- 1 root root 4.2K 2006-06-30 06:03 wgetrc
    drwxr-xr-x 2 root root 4.0K 2006-10-25 07:03 wpa_supplicant
    -rw-r----- 1 root dialout 66 2006-10-25 07:08 wvdial.conf
    drwxr-xr-x 9 root root 4.0K 2006-12-26 18:46 X11
    drwxr-xr-x 4 root root 4.0K 2007-03-09 11:05 xdg
    drwxr-xr-x 2 root root 4.0K 2006-10-25 07:08 xml
    Im not 100% sure, but from left to right, I know that "d" stands for "directory" (it is also listed in "blue" color), the first "r" means "read", "w" for "write", "x", for "executable". But what about the next "r", "x," "r", and another "x"? Also waht does the number stands for?

    My other question is what do the colors mean? I know that "blue" is for directory, "green" is for executable, "red" is for archives(?), "aqua" is for symlinks. There are other colors and I don't know what they are. I know the "dircolors" command, but I don't really understand the use of it.

    Thanks.

    #2
    Re: Question about ls: what do the letters stand for?

    There are a series of r's, w's, and x's. The first set is for the owner of the file, the second set is for the file's group, and the last is for anyone else. For example, if you have -rw-r--r--, that means the owner can read or write the file, but others in the group or others outside the group can only read the file.
    Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

    Comment


      #3
      Re: Question about ls: what do the letters stand for?

      http://en.tldp.org/LDP/intro-linux/html/sect_03_03.html

      Comment


        #4
        Re: Question about ls: what do the letters stand for?

        Awesome! Thanks for your answers guys.

        Comment

        Working...
        X