[jp] Cannot delete/home/bob/.jpilot/Backup/Archive_2003-xx-xxfiles

Jeff Vian jvian10 at charter.net
Mon Mar 24 00:24:19 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
>bob.users.
>  
>
IIRC  (and I have used it many times)  "."  refers to the present directory.
Thus  a command such as
       chown -R bob.users .
will act on the  "."  direcotry and recursively on its contents.

"chown -R"  works only on the named directory and recursively on all its 
contents.  It does not (in any form of chown I have seen) walk the 
direcotry structure upward.

Care must be taken to only start it at a point where you actually want 
the named user.group to become the owners at that level and below.

>  
>
>>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.
>
>
>d.
>
>_______________________________________________
>jpilot mailing list
>jpilot at jpilot.org
>http://www.jpilot.org/mailman/listinfo/jpilot
>
>  
>




More information about the Jpilot mailing list