rsync ownership oddity - bug or feature?

Keith keith at caramail.com
Thu Apr 21 20:09:00 UTC 2022


On 4/21/22 8:09 AM, Karl Auer wrote:
> On Wed, 2022-04-20 at 21:51 -0500, Keith wrote:
>> Assuming your shell is bash, enable the shell option "dotglob".
> 
> Thanks, Keith.
> 
> For the moment, I have fixed things by doing a chown after the rsync.
> 
> Your fix is better, but it seriously should not be needed.
> 
> I put in a feature request to the maintainer, you never know  :-)
> 
> Regards, K.
> 

Well, I find enabling dotglob is useful in other contexts like recursive 
deletion of hidden files/directories for instance. Instead of typing 
something dangerous like "rm -r .*" to delete hidden files and 
directories without dotglob enabled, you can type "rm -r *" with dotglob 
enabled and it matches hidden and non-hidden files and directories alike 
without going up into the parent directory. (".*" matches the ".." shortcut)

-- 
Keith





More information about the ubuntu-users mailing list