I'm looking for a Linux command to go through all the directories on my server and find all .htaccess files. The output would be a list of all those files with full path, creation/modification date and filesize.
Login to your cPanel. Under the Files section, click on File Manager. Locate your . htaccess file, you may have to show hidden files.
htaccess file can be found at installdir/APPNAME/. htaccess. Some applications do not have the installdir/apache2/conf/vhosts/htaccess/APPNAME-htaccess. conf file.
If your . htaccess file is missing, then the first thing you need to do is to visit Settings » Permalinks page and click on 'Save Changes' button without changing anything. WordPress will now try to generate the . htaccess file for you.
find / -name ".htaccess" -print
Replace /
with the root folder you like to start searching, in case you don't want to search the whole file system.
Wikipedia has an article about find, which also links to its man page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With