![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find and delete the line | gsusarla | UNIX for Advanced & Expert Users | 8 | 07-09-2008 05:15 PM |
| sed: find match and delete the line above | cstovall | Shell Programming and Scripting | 3 | 07-02-2008 11:31 PM |
| Find a word and delete the line | gsusarla | UNIX for Dummies Questions & Answers | 1 | 04-02-2008 03:45 PM |
| To Know this find and delete will work ???.. | arunkumar_mca | UNIX for Dummies Questions & Answers | 4 | 12-27-2007 07:18 AM |
| unable to delete file for permission problem | sabyasm | UNIX for Dummies Questions & Answers | 4 | 02-26-2006 08:55 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Find who has permission to delete
All,
I am running a script , which has permision as below -r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln and tring to delete the file in the directory inter (sys212 ct:/>) ll | grep ^ddr-xr-xr-x 32 bin bin 8192 Dec 24 03:24 etc drwxr-xr-x 32 root root 1024 Nov 27 16:45 home drwxrwsr-x 3 inter inter 10240 Dec 21 15:03 inter (sys212 ct:/>) cd inter(sys22 ct:/inter>) ll | head-rw-r----- 1 int01 inter 11055 Jul 5 2006 06187.txt -rw-r----- 1 int01 inter 9380 Jul 6 2006 06188.txt -rw-r----- 1 int01 inter 24388 Jul 7 2006 06189.txt How can i know that whether my script ccln is having permision to delete the files inside the directory . Please let me know how to find out -r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln what are the operation the ccln can perform . Inside ccln i am find the file and deleting the file . It is not working for directory inter that i mentioed above . Can any one let me know why an d how cani overcome the same Thanks, Arun |
|
||||
|
Also i facing the below problem as well.
In my directory i am having many files and subdirectories. my directory is like below drwxrwxr-x 5 root canusr 8192 Dec 5 12:50 tran others dont have write permision in side my directory the files i am having are $cd tran drwxr-xr-x 2 v1ftp cnur 8192 May 1 2007 v1ftp drwxrwxrwx 3 v1ftp cnur 24576 Dec 24 06:00 v1 drwxrwxrwx 2 ham cnur 8192 Nov 6 09:28 itm -rwxrwxrwx 1 scott cnur 1006258 Sep 19 15:33 7041012_cpy -rwxrwxrwx 1 scott cnur 72928579 May 1 2007 uswst.gz My question is : When i use find and delete to delete the files that are 30 days old why the files 7041012_cpy and uswst.gz are not getting deleted . Also the same find and delete command is deleting the file that 30 days old inside the dir v1 My Assumptions Is that my directory is not having write permision the files in the dir is not getting deleted. if so the how come the same command working and deleting the file inside the sub_directory. Thanks, Arun |
|
||||
|
All,
I have found some thing please correct me if i am wrong 1. If a file Doesnt have write permision we cannot delete the file 2. If a directory doesnt have write permision , We cannot delet eany files in sidethe directory. 3. If a directory doesnt have wrote permsion and its subdiretory has write permision we can delete the files inside the sub directory. I am confused about this 3 rd point Even though the parent directory doesnt have write permision how unix allows the delete operation perform in it sub directory. Thanks, Arun |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|