LoginSignup
31
31

More than 5 years have passed since last update.

2003/04 - 2014/08 の間に増えたLinuxコマンド(GNU coreutils)

Posted at

はじめに

最近、timeout コマンドを教えてもらいました。
こんな便利なコマンドがあったんですね。
最近できたコマンドだよ、と教えていただきましたが、他にもそういった最近できたコマンドがあるのではないか、と思って調べてみました。

調査方法

http://ftp.gnu.org/gnu/coreutils/ から、coreutils-5.0 と、coreutils-8.23 をダウンロードし、AUTHORS ファイルの中身を比較しました。

本当は、make して作られたバイナリファイルの数を比較したかったのですが、
自分の環境だとcoreutils-5.0がコンパイルできなかったので早々に諦めました。

結果

コマンド 概要(man より) 備考
arch print machine hardware name (same as uname -m)
base64 base64 encode/decode data and print to standard output base64方式によるエンコード/デコード
chcon change file security context SELinuxコンテキストを変更する
dir list directory contents
groups print the groups a user is in
mktemp create a temporary file or directory
nohup run a command immune to hangups, with output to a non-tty ssh との組み合わせで良く使われる
nproc print the number of processing units available
numfmt Convert numbers from/to human-readable strings numfmt --to=iec 2048
numfmt --from=iec 2G などでバイト計算に使えそう
readlink print resolved symbolic links or canonical file names readlink -f `which java` などと良く使います
realpath return the canonicalized absolute pathname コマンドではなく関数のようです
runcon run command with specified security context
sha1sum compute and check SHA1 message digest
sha224sum compute and check SHA224 message digest
sha256sum compute and check SHA256 message digest
sha384sum compute and check SHA384 message digest
sha512sum compute and check SHA512 message digest
shuf generate random permutations 入力行ランダムに並び替える
stdbuf Run COMMAND, with modified buffering operations for its standard streams. 使用例: stdbufコマンドを使用してコマンドの標準出力にタイムスタンプを追加
timeout run a command with a time limit
truncate shrink or extend the size of a file to the specified size
vdir list directory contents dir -lls -l と同じ出力でした

まとめ

stdbuf は便利そうですね。使用例先のように、タイムスタンプを出力するときに使えそうです。

31
31
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
31
31