I'm trying to understand how to delete directories using the Linux find command with -exec option, without getting a "No such file or directory" response. On my Raspberry Pi I go to /home/pi and type: mkdir testing So now I have created a new directory named /home/pi/testing. Next I try to delete the directory using this command:
find /home/pi/testing -type d -exec rm -rf {} \; I get the following response:
find: '/home/pi/testing': No such file or directory But the /home/pi/testing directory is gone. So the command seemed effective, but why the "No such file or directory" error?