LoginSignup
0
1

More than 5 years have passed since last update.

Linuxコマンドのメモ

Last updated at Posted at 2018-07-06

ディスクの空き領域を調べる

df -h --total

カレントディレクトリのディスク使用量の合計だけ表示する

du -s -h

ファイル数をカウントする

ls -F | grep -v / | wc -l

ファイルを作成日順にソートして表示する 

ls -l -lt -c

ファイルをサイズが大きい順にソートして表示する 

ls -S -l -h

dir_name以下のファイルを全て圧縮する。
(ファイルが多くてzip: argument list too longが出る時に)

zip -r file.zip dir_name

apiとかの結果をとりあえず見る

curl "URL"

pythonのバックグラウンド処理
pythonでnohupを実行すると、出力がバッファにとどまってしまうので-uオプションをつける必要がある

nohup python -u hoge.py > out.log &

バックグラウンド処理の停止

# PIDを確認する
ps x

# PIDを確認したらkillする
kill PID
0
1
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
1