LoginSignup
4
5

More than 5 years have passed since last update.

(コマンドメモ)findの使い方

Last updated at Posted at 2014-05-25

例えば hoge という名前のファイルがどの場所にあるのか完全に忘れてしまった(あるいは知らない)のであれば・・・

sudo find / -name hoge

こうすると管理者権限でルートディレクトリ以下(要するにマシン上の全データ)の中から -name 後に挙げた名前を検索してくれる。
時間はかかるが、 実在するファイルなら確実に居場所が判明する ので最終手段として使える(ある程度場所に見当がついているのであればそこから下で検索をかけたほうが早いが)。

参考

UNIX:http://www.k-tanaka.net/unix/find.php
Linux:http://itpro.nikkeibp.co.jp/article/COLUMN/20060227/230777/
どっちも同じか?

4
5
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
4
5