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?

【Linux】Grepコマンドまとめ

Last updated at Posted at 2023-05-19

パワーシェル系コマンド

用途 コマンド
1階層上に移動 cd ..
2階層上に移動 cd ../..
コマンドの履歴 history
コンソールクリア clear
grep '<time' -rl /var/www/*
grep "example" --include="*func.php" ~/
fgrep "<script>" --include="*func.php" -rl /var/www/*
grep '\<time\>.*\</time\>' -rl /var/www/*
grep '<time.*</time>' -rl /var/www/*
grep 'wp_enqueue_script(' -rl ./*

正規表現検索

 grep '\->data\[' -rl /var/www/aaaaaa/*


 grep -Er '<div id="gNavi_button">'  /var/www/aaaaaa/application

ファイル名検索

find -name "functions_inc.php"


find /var/www/* -name "functions_inc.php"

ファイル名部分一致検索

find /var/www/* -iname "*ini"

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?