find . and find . -depth -print
What is the difference?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-depthsimply means that the contents of a directory are processed before the the directory itself:-printmeans that each item is printed to standard output. This is often the default on system where you don’t specify an action but I’ve seen some that default to doing nothing (not very useful in my opinion).You’re probably better off (if your system supports them) explicitly using
-print0if you’re going to be piping the output toxargs(and usexargs -0). This will remove problems of spaces in filenames.