タグ

commandに関するTetsu3のブックマーク (3)

  • All commands

    Other solutions that involve doing du -sx /* are incomplete because they will still descend other top-level filesystems are that mounted directly at "/" because the * expands to explicitly include all files and directories in "/", and du will still traverse them even with -x because you asked it to by supplying the directory name as a parameter (indirectly via "*"). Show Sample Output 4.0K /mnt 4.

    Tetsu3
    Tetsu3 2009/02/09
    ワンライナーの共有。
  • UNIXツール

    UNIXツール cut paste sed tr grep sort uniq cutコマンド cutコマンドはデータからフィールドを切り出すとき使う。 (例) cut -c1 file ファイルの各行の最初の文字を切り出す。 cut -c1-10 file ファイルの各行の1~10番目の文字列を切り出す。 cut -c20- file ファイルの各行の20番目から後の文字列を切り出す。 cut -d: -f1 file ファイルの各行のコロン(:)で区切られた最初のフィールドを切り出す。 cut -d' ' -f1,2 file ファイルの各行のスペースで区切られた最初と2番目のフィールドを切り出す。 pasteコマンド pasteコマンドは2つのデータを連結する。 (例) paste file1.txt file2.txt file1.txtに 1 2 3 file2.txtに One

  • [ThinkIT] 第3回:システムの情報を集める (1/3)

    第1回ではパフォーマンス測定項目、第2回ではOSに設定されているパラメータを解説しました。今回は第1回に解説したCPUやディスクに関する情報を収集するコマンドを解説します。 Linuxのシステム情報を集めるのには、標準で使えるコマンドのほかにsysstatパッケージに含まれている「iostat」「sar」「mpstat」といったコマンドを使います。しかしOSインストール時のパッケージ選択画面で、標準を選択しているとsysstatパッケージは導入されません。 sysstatパッケージを導入するには、OSインストール時のパッケージ選択画面で「システムツール」を選択して詳細から個別にパッケージを選択するか、または、SYSSATのサイトからソースコードをダウンロードしてインストールすることも可能です。 sysstatパッケージは上記コマンドを提供するだけでなく、OS起動時にsysstatとcron

  • 1