[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rm feature request
From: |
Ian Lynagh |
Subject: |
rm feature request |
Date: |
12 Feb 2001 15:36:04 GMT |
User-agent: |
slrn/0.9.6.3 (Linux) |
Hi all
My backup scripts are creating directory trees like this:
mkdir foo
touch foo/bar (optional)
chmod 0 foo
and, when they come to be rotated, rm -rf foo will not delete the tree
as it can't chdir to foo. I am currently running chmod u+rwx
recursively first, but this strikes me as an ugly and inefficient
solution.
I submitted a patch which basically added
/* Make target directory u+rwx if it isn't already */
if ((!(fs->mode & S_IRUSR) || !(fs->mode & S_IWUSR) || !(fs->mode & S_IXUSR))
&& !x->interactive)
/* We don't care about errors here, let them get caught below */
chmod (dir_name, fs->mode | S_IRUSR | S_IWUSR | S_IXUSR);
before trying to chdir but Jim Meyering said that this went against
history and standards. I then suggested it use a different parameter to
be enabled and offered to write a patch, but he said I should post here
and depending on the response he would decide if it was worth adding to
GNU rm.
So, does anyone have any comments?
Thanks in advance
Ian
- rm feature request,
Ian Lynagh <=