I have a list of files which I got using find / -type f -size +10M -exec ls -l {} \;
I got this command from here
How can I remove all these files ?
I tried
sudo rm `find / -type f -size +10M -exec ls -l {} \;`
but it doesn't work.
Also, what does {} \ do ? And what's the use of -exec in this command, will the pipe operator not work ?
findmanual page.findexecutermfor you instead ofls?'{}'is the placeholder for theexeccommand (it works a bit likexargs). It is replaced by the file name found for every new file meeting requirements is found.\;is used with-execoption which denotes the termination ofexec.