LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-27-2007, 07:00 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Question command to view permission of directories


hi

what is the command to view permission of files and directories

thank u
 
Old 10-27-2007, 07:01 AM   #2
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
u can hit "ls -l" it will give u the permissions.. minus the speech marks tho lol..
 
Old 10-27-2007, 07:01 AM   #3
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 115

Rep: Reputation: 15
do you mean ls -la /directory ?
 
Old 10-27-2007, 07:12 AM   #4
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thank mobs99

actually i want to delete a directory in the trash i tried by changing the permission by using chmod command like this


user@localhost:~/.Trash$ chmod 777 ksquirrel-libs-0.7.1/


then i tried to delete using rm like this

user@localhost:~/.Trash$ rm ksquirrel-libs-0.7.1/
rm: cannot remove `ksquirrel-libs-0.7.1/': Is a directory


so i viewed the permissions again it displays like this

user@localhost:~/.Trash$ ls -l
total 8
drwxrwxrwx 4 user user 4096 2007-10-26 11:40 ksquirrel-libs-0.7.1


how can i delete the file

thanks
 
Old 10-27-2007, 07:14 AM   #5
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
u can delete the file manually by going into ur directories.. i cant remember the actual command line for it...i think its rmdir "filename[/B]" minus the speech marks again....
 
Old 10-27-2007, 07:19 AM   #6
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
when i tried to delete manually i got the following message in the message box.



"/home/user...e/requests" cannot be deleted because you do not have permissions to modify
its parent folder.
 
Old 10-27-2007, 07:22 AM   #7
mobs99
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
wots the actual permisions uve set.. set it to. is it a folder or a file inside a folder... if its a folder set it to.. chmod 711... file chmod 644
 
Old 10-27-2007, 07:33 AM   #8
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
its a directory i have tried

[root@localhost .Trash]# chmod 711 ksquirrel-libs-0.7.1/



and then


[root@localhost .Trash]# ls -l ksquirrel-libs-0.7.1/
total 1108
drwx--x--x 2 root root 4096 2007-09-19 15:10 autom4te.cache
-rwx--x--x 1 root root 1026936 2007-09-19 15:11 configure
-rwx--x--x 1 user user 681 2007-08-31 00:20 INSTALL
drwx--x--x 59 user user 4096 2007-09-19 15:10 kernel
-rwx--x--x 1 root root 326 2007-09-19 14:53 ksquirrellibs.pc
-rwx--x--x 1 user user 321 2007-08-30 23:45 ksquirrellibs.pc.in
-rwx--x--x 1 root root 26027 2007-09-19 15:11 Makefile.in
-rwx--x--x 1 user user 4536 2007-08-30 23:45 mng_LICENSE
-rwx--x--x 1 user user 0 2007-09-15 01:17 stamp-h.in
-rwx--x--x 1 user user 11 2007-08-30 23:45 subdirs



now when tried to remove using

[root@localhost .Trash]# rm ksquirrel-libs-0.7.1/
rm: cannot remove `ksquirrel-libs-0.7.1/': Is a directory


it is a directory

thanks for u r time
 
Old 10-27-2007, 07:47 AM   #9
selva146
Member
 
Registered: Oct 2007
Location: INDIA
Distribution: Rehat, Fedora, RHEL
Posts: 47

Rep: Reputation: 15
hi
if you want to delete a directory, use the following command..


rm -rf dirname

this will delete the files and subdirs inside the dir recursively and delete the dir

-r ------recursive
-f ------ force


ok
 
Old 10-27-2007, 07:56 AM   #10
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thankyou selva it has worked
 
  


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
ls to view directories only mikemrh9 Linux - Newbie 26 07-08-2015 01:27 PM
how to view only directories with ls LinuxLover General 5 09-15-2006 11:55 AM
View directories size rickylim Linux - General 3 07-18-2006 11:24 PM
How to view those .directories thort Linux - Newbie 3 02-12-2006 12:37 PM
How to view directories through putty of a server jai_linux Linux - Software 2 07-10-2004 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 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
Open Source Consulting | Domain Registration