All Questions
3
questions
0
votes
2
answers
917
views
Find not working as expected with space in directory
I have a script calling this
find "/mnt/Data/Shared/$1" -type d -exec bash -c 'fixperm "'${1}'" "fd" "$0"' {} \;
$1 is a directory, when the name contains no spaces it works, when there is a space ...
0
votes
2
answers
90
views
chmod files with group - error on files with (
I have the need to chmod files which are in a certain group. I have come up with this construct:
find . -group groupname -exec sh -c 'su -c "chmod -R u+w,g-w,o-w,g+r,o+r ." - groupname {}' \;
This ...
10
votes
3
answers
51k
views
Why can't find -regex match a newline?
Why does this fail?
touch "$(printf "a\nb")"; find . -regex './.\n.'
I also tried these, none of which work:
find . -regextype posix-extended -regex '.\n.'
find . -regextype posix-awk -regex '.\n.'
...