12-24-2007
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
We are facing problem to delete some logfiles. Explaing with example for clear understanding :
we have 2 accounts : prdpqrs (application account) & prodxyz (admin account - not root). Both of them are in same group called 'release'
While prodxyz is trying to remove a file owned by... (4 Replies)
Discussion started by: sabyasm
4 Replies
2. Shell Programming and Scripting
Hi
Using find i want to find files with permission below 664. (6 Replies)
Discussion started by: aliahsan81
6 Replies
3. Post Here to Contact Site Administrators and Moderators
i think we should also have the permissions to delete our own thread (3 Replies)
Discussion started by: tarunicon
3 Replies
4. Fedora
Hello. I need to write a script that lets the user pick a directory. Then, all files are looped through, and the ones with read-write (for current user I think) are listed. Ending with a count of those files, but that parts easy. What I'm confused about is the middle.
So far I have
... (15 Replies)
Discussion started by: Feuyaer
15 Replies
5. Solaris
Hi,
I have a directory /u01/source.
Following are current permission on directory source.
oracle@TEST # ls -l source
drwxrwxrwx 2 user1 userbi 31232 Apr 8 13:33 EG1
drwxrwxrwx 2 user1 userbi 1024 Apr 8 05:45 E2
drwxrwxrwx 2 user1 userbi 57344 Mar 15 10:22 h5
There is another ... (4 Replies)
Discussion started by: fahdmirza
4 Replies
6. SuSE
I am trying to delete a folder, but unable to do so. tried my level best to delete.
Here I am giving all the steps I have tried out -
1. Output of ls -la
ls: cannot access -loop0: Permission denied
ls: cannot access -e0.7: Permission denied
total 324
d????????? ? ? ? ? ? -e0.7
d????????? ?... (4 Replies)
Discussion started by: sudip.majumder
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm trying to search for files with a particular pattern using the below command.
find . -name file_1.txt -print
It gives Permission denied error on several files, using standard error, how do we ignore this error and print only the valid matches.
find:... (1 Reply)
Discussion started by: Dev_Dev
1 Replies
8. UNIX for Dummies Questions & Answers
Can any one tell me is there any command to find out who changed the permission of a file Or is there any log file so that i can find out who has changed the permission of a file?
Thanks in Advance:) (7 Replies)
Discussion started by: Uttamnsd
7 Replies
9. Shell Programming and Scripting
Hello all,
I have a problem with rsync command.
From a backup server, I use a command like the one below:
rsync -av --delete user@host:/home/user/ /home/backup_user/daily_rotating_backup/
In some folders of the user there are some files on which he has removed his write permission on... (3 Replies)
Discussion started by: freddie50
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am using the following find command to search for file permissions that I have to correct
find . -perm 777 -type f -print
find . -perm 777 -type d -print
I then do a chmod o-w,o-r,o-x to make them not not 777.
I am also needing to search for where the others has... (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT OSF1
mktrashcan
mktrashcan(1) General Commands Manual mktrashcan(1)
NAME
mktrashcan, rmtrashcan, shtrashcan - Attaches, detaches, or shows a trashcan directory
SYNOPSIS
/usr/sbin/mktrashcan trashcan directory...
/usr/sbin/rmtrashcan directory...
/usr/sbin/shtrashcan directory...
OPERANDS
Specifies the directory that contains files that were deleted from attached directories. Whenever you delete a file in the specified
directory, the file system automatically moves the file to the trashcan directory. Specifies the directory that you attach to a trashcan
directory.
DESCRIPTION
The trashcan utilities (mktrashcan and rmtrashcan) enable you to attach or detach an existing directory, which you specify as a trashcan
directory, to any number of directories within the same fileset.
A trashcan directory stores the files that are deleted with the unlink system call. For instance, you can use the mktrashcan utility to
attach a trashcan directory called /usr/trashcan to one or more directories; thereafter, when you delete a file from one of the attached
directories, the file system moves the file to the /usr/trashcan directory. Note that when more than one directory shares attachment to a
trashcan directory, files with the same file name can overwrite each other in the trashcan directory.
If you mistakenly delete a file, use the mv command to return the file from the /usr/trashcan directory to its original directory.
When you enter shtrashcan at the system prompt, the system shows the trashcan directory, if one exists, for the directory you specified.
It is important that trashcan directories have correct access permissions. If the permissions are too restrictive, then it may be impossi-
ble to remove files from the directories that are attached to the trashcan directory. In general, all users and groups that expect to use
the trashcan directory need write permission to the directory. If unexpected "permission denied" errors occur when deleting files that are
in a directory attached to a trashcan directory, use the chmod command to change the permissions on the trashcan directory.
RESTRICTIONS
The directory and trashcan directories must be in the same fileset; however, you can attach the trashcan directory to any directory within
the fileset.
EXAMPLES
The following example creates and attaches a trashcan directory, /usr/trashcan, to two directories, /usr/ray and /usr/projects/sql/test,
which are in the same fileset. The chmod command adds write permission for all users and groups on the new trashcan directory. % mkdir
/usr/trashcan % chmod a+w /usr/trashcan % mktrashcan /usr/trashcan /usr/ray /usr/projects/sql/test To attach the trashcan directory,
/usr/trashcan, to all subdirectories in the /usr directory, enter: % mktrashcan /usr/trashcan /usr/*
New subdirectories that you add beneath the /usr directory are not attached to the trashcan directory until you attach them. Also,
the mktrashcan utility distinguishes between directories and files, attaching only directories to the trashcan directory.
Note that an attached directory produces an EDUPLICATE_DIRS (-1165) error when /usr/trashcan is itself in the directory path you
attach to (as in the previous example). You can ignore this error message.
SEE ALSO
advfs(4), mkfset(8), showfsets(8)
mktrashcan(1)