3
7

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 5 years have passed since last update.

Linux便利コマンドメモ

Posted at

マイボスから伝授して頂いた便利コマンド備忘録
##プロジェクトのファイル内で、hogeという文字列が存在するファイルを探すとき

$ find . -type f | xargs grep -n "hoge"

##指定フォルダ内の合計サイズ

$ du -sk [フォルダ名]

##検索対象ファイル内のhogeが出てくる行の前後3行を表示

$ grep -B 3 -A 3 "hoge" [検索対象ファイル名]

##アクセスログみるとき

$ tail -f access_log

##アクセスログ監視時特定の文字のログだけ追いたいとき

$ tail -f access_log | grep "hoge"

##プロジェクトをtarしてからgzip

$ tar zcvf プロジェクト名.tar.gz [プロジェクト名]

##tar.gzを展開

$ tar zxvf プロジェクト名.tar.gz
3
7
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
3
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?