On Sun, Jul 15, 2018 at 12:41 PM andremw <andr...@protonmail.com> wrote: > -find /home/user -type d -print0 | xargs -0 chmod 0775 > -find /home/user -type f -print0 | xargs -0 chmod 0664 > > In busybox they work, in sbase they return- > -find: paths must precede expression: -print0 > -usage: xargs [-rtx] [-E eofstr] [-n num] [-s num] [cmd [arg ...]]
find -print0 is not specified by POSIX. If you want to print nul separated data use: find ... -exec printf %s\\0 {} + But that's normally useless as xargs -0 is also not specified by POSIX. The solution is to just use find's -exec. The two commands would be: find /home/user -type -d -exec chmod 0775 {} + find /home/user -type f -exec chmod 0664 {} +