dotly
dotly copied to clipboard
dot command error: "find: -perm: /+111: illegal mode string"
When I run the dot
command I get the error find: -perm: / + 111: illegal mode string
and the dot (fzf) contextual help shows empty
Code location: https://github.com/CodelyTV/dotly/blob/9b11497e19f7d6b3ce4c54463b7d3d2f05e4518e/scripts/core/dot.sh#L28
If I try removing the "/
" character from "-perm
" parameter the find
command is executed without errors and return the right information (scripts path)
dotfiles installed and executed in macOS BigSur v11.6
I think I found the issue cause.
For some reason I was not using the gfind of the findutils installed from homebrew
Solved running this command:
ln -sf ../Cellar/findutils/4.8.0_1/bin/gfind /usr/local/bin/find
With this gfind version the slash "/
" char in -perm
parameter works fine
Is there a way to fix all possible problems with homebrew installations symlinks? I tried with a brew upgrade
or brew upgrade findutils
but it didn't work
fixed for my with ln command ln -sf /usr/local/Cellar/findutils/4.9.0/bin/gfind /usr/local/bin/find
I think the problem is because there is not exist gfind inside /opt/homebrew/bin/ so the default configuration provided of the symbolic links is not valid.
Not all installations of Brew have the same path... A solution could be:
brew unlink findutils
brew link findutils
If you want the findutils path: brew --prefix findutils
would be better or use HOMEBRE_PREFIX
on a new installation I solved it by replacing
path+=(
"paths"
)
for
path=(
"paths"
$path
)
interestingly, if I try to patch my dotly with https://github.com/CodelyTV/dotly/pull/220 it doesn't work. I have to remove the /
parameter.
◼ mbertamini:homebrew /bin/ stable ◍ $ pwd
/opt/homebrew/bin
◼ mbertamini:homebrew /bin/ stable ◍ $ ls -al | grep -i gfind
lrwxr-xr-x 1 mbertamini admin 35 Sep 13 11:41 gfind -> ../Cellar/findutils/4.9.0/bin/gfind
I'm having the same problem. Shouldn't this be fixed in the repo? #220 solves it for me but I don't see any progress on that PR
I have the same issue and I think the problem is the version of find
command that is been used.
Without make any change:
<▸> ~ which find
/usr/bin/find
<▸> ~ ls -lah /usr/bin/ | grep find
-rwxr-xr-x 1 root wheel 199K 28 oct 10:43 find
The find
command aims to /usr/bin/find
After applying the changes made in #220 PR:
<▸> ~ which find
/Users/username/bin/find
<▸> ~ ls -lah ~/bin | grep find
lrwxr-xr-x 1 username staff 23B 4 dic 02:20 find -> /opt/homebrew/bin/gfind
So, for fixing this issue I think you need to made the changes needed to use gfind
installed by Homebrew instead of the default one store in /usr/bin/find
. (In my case, is aplying the changes in #220)
Why some of us have this issue and is not set the correct version of find
by default? Who knows 🤷♂️
as @fabriziofs says, that fixed the issue 😉
Closing since it's fixed in https://github.com/CodelyTV/dotly/pull/220 🙂
Thanks everybody for reporting and fixing!