For those of you who enjoy the excitement of running dangerous commands:
Replace “.log” with the file extension you wish to remove
find . -type f -name "*.log" -exec rm -f {} \;Find all .htaccess files starting in “/” directory:
find / -name ".htaccess" -print
Or
locate .htaccess
For more information of the file(s) such as permissions, ownership, and last modification timestamp:
ls -l $(locate .htaccess)
Find all files with specific extension starting from “/”:
find / -name '*.txt'
To find a specific file with extension “.txt” in current directory just exclude “/”
Find more information of files with specific extension such as ownership, file location, permission and last edit date:
ls -l $(locate *.txt)
Find all hidden directories starting in “/”:
find / -type f -name ".*"