Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

find command on linux. Learning?

$ find ~ -name delete_me -type f -print0 | xargs -0 /bin/rm -f

Q1.What does it meant by -print0, why is it required ?

Q2.Why /bin/ ? why not just rm -f ?

This command only delete matched file in ~ directory; it won't delete matched file in subdirectory or sub sub directory..

Q3. How to modify it so that it will find and delete all the matched file in  subdirectories as well ?

Q4. How to modify it so that it will not find into a certain directory ?

Thx

1 Answer

Relevance
  • 1 month ago

    You will get better advice by seeking a Linux forum or by searching for a Linux reference text online - and there are many.

Still have questions? Get your answers by asking now.