LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-18-2004, 02:04 PM   #1
coopns
Member
 
Registered: Jan 2004
Location: Scituate, MA
Distribution: Mandrake 10
Posts: 94

Rep: Reputation: 15
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.
 
Old 06-18-2004, 02:27 PM   #2
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
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!
 
Old 06-18-2004, 02:44 PM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
file permission jh31480 Linux - Newbie 2 01-25-2005 07:42 PM
a question about file permission tony yu Mandriva 5 04-13-2004 11:18 AM
file/directory access permission question correro Linux - General 4 05-22-2003 08:48 PM
what's file permission for this? doublefailure Linux - Newbie 2 03-16-2002 12:21 PM
File Permission glock19 Linux - General 4 01-02-2002 08:40 PM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration