Hello,
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.
Hello,
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.
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.
It's easy with the find
command.
find / -name .htaccess -exec ls -l {} \;
This will print the name, and the file details according to ls -l
. Note that this is starting the search under /
, which may take a long time. You might want to specify a different folder to search.
Could be as simple as
ls -l $(locate .htaccess)
if updatedb
has run recently.