English 中文(简体)
Find all htaccess files on server [closed]
原标题:

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 7 years ago.

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.

Another simple way to achieve:

locate .htaccess

find -name .htaccess

Could be as simple as

ls -l $(locate .htaccess)

if updatedb has run recently.





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签