How to exclude “Permission denied” from find results

Use:

find . 2>/dev/null > files_and_folders

This hides not just the Permission denied errors but all error messages.

Leave a Reply

Your email address will not be published. Required fields are marked *