I have the following command
find . -type f -print0 | xargs -0 chmod 644
which would successfully change to 644 the permissions on all files in ., provided that the filenames contained no embedded spaces. However it doesn't work in general.
For example
touch "hullo world"
chmod 777 "hullo*"
find . -type f -print0 | xargs -0 chmod 644
returns
/bin/chmod: cannot access `./hello': No such file or directory
/bin/chmod: cannot access `world': No such file or directory
Is there a way to modify the command so that it can deal with files with embedded spaces?
Thanks very much for any advice.