LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File Permission Question (https://www.linuxquestions.org/questions/linux-newbie-8/file-permission-question-195042/)

coopns 06-18-2004 01:04 PM

File Permission Question
 
Help me understand this would you?

1.
[coop@x1-6-00-a0-cc-5f-d9-d3 Documents]$ ls -l
total 8 -rwxrwxrwx 1 coop coop 5943 Jun 15 21:08 Linux stuff.sxc*
(What does total 8, what does 1 and what does 5943 stand for. I know the rest.)

2.
[coop@x1-6-00-a0-cc-5f-d9-d3 Documents]$ ls -l Linux stuff.sxc
ls: Linux: No such file or directory
ls: stuff.sxc: No such file or directory
I thought $ls -l Linux stuff.sxc would give me the permissions..etc.

I thought when I did ls -l Linux stuff.sxc it would give me -rwxrwxrwx ....line

So when I do this:
[coop@x1-6-00-a0-cc-5f-d9-d3 Documents]$ ls -l
This lists what is in the Documents directory with the permission, etc.

Thanks.

jeffreybluml 06-18-2004 01:27 PM

Not sure what the portions of it you asked about mean, but I can tell you why it didn't work when you did

ls -l Linux stuff.sxc

It's because you have a space in the name, and you need to enter a backslash prior to the space or it thinks you're looking at two different files...one calle Linux and one called stuff.sxc. It would need to look like this:

ls -l Linux\ stuff.sxc

That's all I've got...

Good luck!

Dark_Helmet 06-18-2004 01:44 PM

From the info pages of ls (info ls):
Quote:

`-l'
`--format=long'
`--format=verbose'
In addition to the name of each file, print the file type,
permissions, number of hard links, owner name, group name, size in
bytes, and timestamp (*note Formatting file timestamps::), normally
the modification time.

For each directory that is listed, preface the files with a line
`total BLOCKS', where BLOCKS is the total disk allocation for all
files in that directory. The block size currently defaults to 1024
bytes, but this can be overridden (*note Block size::). The
BLOCKS computed counts each hard link separately; this is arguably
a deficiency.

The permissions listed are similar to symbolic mode specifications
(*note Symbolic Modes::). But `ls' combines multiple bits into the
third character of each set of permissions as follows:

`s'
If the setuid or setgid bit and the corresponding executable
bit are both set.

`S'
If the setuid or setgid bit is set but the corresponding
executable bit is not set.

`t'
If the sticky bit and the other-executable bit are both set.

`T'
If the sticky bit is set but the other-executable bit is not
set.

`x'
If the executable bit is set and none of the above apply.

`-'
Otherwise.

Following the permission bits is a single character that specifies
whether an alternate access method applies to the file. When that
character is a space, there is no alternate access method. When it
is a printing character (e.g., `+'), then there is such a method.



All times are GMT -5. The time now is 08:38 PM.