0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【超シンプル】Bash の find コマンドで .htaccess (特定ファイル) のパス一覧を出力する

Last updated at Posted at 2023-01-20

ウェブサイトの中にある .htaccess などの特定ファイルが、サーバー上のどこに存在しているか、一覧を出力するのには find コマンドが便利です。

フォーマット

find [親フォルダパス] -name "[ファイル名]" -print

find /Users/katz/Sites/example -name ".htaccess" -print

こんな感じでパス一覧が出ます。

サンプル

% find /Users/katz/Sites/example -name ".htaccess"
/Users/katz/Sites/example/public/.htaccess
/Users/katz/Sites/example/public/application/.htaccess
/Users/katz/Sites/example/public/application/files/.htaccess
# .... (省略).....

find コマンド、便利

参考
https://stackoverflow.com/questions/1739013/find-all-htaccess-files-on-server
https://linuxjm.osdn.jp/html/GNU_findutils/man1/find.1.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?