[jp] Cannot delete/home/bob/.jpilot/Backup/Archive_2003-xx-xxfiles
paul at gear.dyndns.org
Sun Mar 23 15:39:29 EST 2003
David A. Desrosiers wrote:
>>That would be better:
>> chown -R bob:users .
>>in case there are dot files in the directory, and a non-GNU version of
>>chown is in use.
> This is lethal, and should _NEVER_ be used like this, because '.'
>and '..' are subdirectories, but are also the parent and cwd, which means
>you'll recursively change permissions _UPWARD_, which is definately not what
>you want, unless you want the entire system from root on down to be owned by
chown knows about .. and doesn't touch it. I don't know on what system
this gave you problems, but it's never done anything the slightest bit
wrong on every version of Unix i've ever tried (although Linux, HP-UX, &
Solaris are the only ones i've touched lately).
>>And that would be much better:
>> find . -type d -print0 | xargs --null chmod 0755
> You're right, for directories with spaces in the filenames, this is
>preferred. I don't like xargs though, it can blindly do things you might not
>want, and I avoid it at all costs, if I have to.
I don't like writing scripts that don't handle spaces in the filenames,
and avoid them at all costs. Like all Unix commands, xargs does exactly
what you tell it to do. :-) I don't see how you can think the above
command more risky than your version...
More information about the Jpilot