I read "Linux Bible 10th Edition" at 130 page. Exercise №7:
Create a /tmp/FILES directory. Find all files under the /usr/share directory that are more than 5MB and less than 10MB and copy them to the /tmp/FILES directory.
My command looks like find /usr/share -type f -size +5M -size -10M -exec cp {} /tmp/FILES \;
. I ran it like usual user and got
cp: error copying '/bla/bla' to '/lol/kek': Input/output error find: '/usr/share/bla-bla': Permission denied
After that I tried to ran it as super user and got error (without Permission denied
):
cp: error copying '/bla/bla' to '/lol/kek': Input/output error
Please, explain me, what the reason of that errors even when I run it as super user. Thank you.
P.S. Please, explain why command with of -exec
should have empty {}
?
/bla/bla
is not even in/usr/share
, is that intentional? Same for/lol/kek
which is not in/tmp/FILES
. – wjandrea Apr 02 '22 at 14:56