LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-08-2005, 01:32 PM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
The rights


The following is the structure of the directories.

/home/ka/user2/letters/important

I am interested in learning the rights of the directory ' letters' . I only want to know, for example, the read, write and executable rights of that folder. I just want to do in one single command.

I am in the 'user2 ' directory

1] ls -l letters

2] ls -l | grep letters

Which is the correct command?
 
Old 06-08-2005, 01:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Well only 1 of those uses one command the other uses two.
 
Old 06-08-2005, 01:52 PM   #3
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
david_ross

I can't understand your answer. Could you elaborate on it?

Do you think both of them are fine? I don't think so.
 
Old 06-08-2005, 02:00 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Is this homework?

What David is trying to say is.. this is easy.. ls is a command and grep is its own command.. from what you provided and asked, I'm sure you can distinct which one truly and only uses one command to perform the same task..
 
Old 06-08-2005, 02:35 PM   #5
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks trickykid and David.

I know that ' ls ' and ' grep ' are two diffferent commands.

1] ls -l letters --_> This command shows the rights of the documents in the 'letters' folder.


2] ls -l | grep letters --> This command direct the output of the ' ls -l ' in to the 'grep' command. I am not sure what is happening to that particular output.

There are documents inside the ' letters' folder. I just want to know which command shows the rights of those documents.

I am in the ' user2 ' folder.

By the way, I am not an expert on these things. I am learning here.
 
Old 06-08-2005, 02:44 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Have you tried ls -ld letters?
 
Old 06-08-2005, 02:44 PM   #7
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
oh, i dont think u specific that before (to list CONTENTS of directory)
Code:
ls -l letters/
 
Old 06-08-2005, 03:02 PM   #8
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
The ' ls -ld ' shows me the following. It is a directory. What does it mean? Is it the home directory?

I guess the rights ' r , w , x ' means that I have all the rights to manipulate that directory. What do you think?

[ka@c83-250-88-135 ka]$ ls -ld
drwxr-xr-x 49 ka ka 8192 Jun 8 20:49 ./
[ka@c83-250-88-135 ka]$
 
Old 06-08-2005, 03:14 PM   #9
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
the ./ means your current directory.. didnt you want to list the contents of letters? i specified how to do that above.
what distro have you been using after 200+ posts here?

research the 'ls' command (here) or look up file permissions in google.

link 1)
link2++

Last edited by nadroj; 06-08-2005 at 03:27 PM.
 
Old 06-08-2005, 04:02 PM   #10
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks nadroj. It was a useful link.

Please look at the following. The ' man ' command with s4 didn't work. Why is that?

It worked in the usual pattern ' man --cp '

[ka@c83-250-88-135 ka]$ man -s4 cp
No manual entry for cp
[ka@c83-250-88-135 ka]$ man --cp

man: unrecognized option `--cp'
man, version 1.5m

usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
[-m system] [-p string] name ...

a : find all matching entries
c : do not use cat file
d : print gobs of debugging information
D : as for -d, but also display the pages
 
Old 06-08-2005, 04:12 PM   #11
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
i have no clue what your asking.. whats s4?
are you looking for the man page for copy/cp? just type 'man cp' then.. u cant pass options (ie --s4 whatever that is) to the man page program
 
Old 06-08-2005, 04:25 PM   #12
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Try "man 4 cp" and you will see a more detailed error. "man cp", "man 1 cp", and "man -s1 cp" will all work.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting SU rights AmdMhz Linux - Software 2 04-13-2005 02:44 AM
do you know your rights? murray_linux Slackware 4 11-20-2003 06:28 PM
Directories rights bally Linux - General 2 11-01-2003 03:04 PM
Rights BoonZie Slackware 8 01-04-2003 07:48 PM
Access rights sore Linux - Newbie 6 01-02-2003 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration