O'Reilly logo

The Linux Command Line by William E. Shotts Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading, Writing, and Executing

Access rights to files and directories are defined in terms of read access, write access, and execution access. If we look at the output of the ls command, we can get some clue as to how this is implemented:

[me@linuxbox ˜]$ > foo.txt
[me@linuxbox ˜]$ ls -l foo.txt
-rw-rw-r-- 1 me    me   0 2012-03-06 14:52 foo.txt

The first 10 characters of the listing are the file attributes (see Figure 9-1). The first of these characters is the file type. Table 9-1 lists the file types you are most likely to see (there are other, less common types too).

Breakdown of file attributes

Figure 9-1. Breakdown of file attributes

The remaining nine characters of the file attributes, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required