タグ

shellに関するqzakuqのブックマーク (2)

  • シェルスクリプトはエレガントでなければならない

    /bin/shの実体としてはash(dash)、bash、kshの採用例が多い。どのシェルもBourne shellの機能に加えて、拡張機能を提供する。 FreeBSDなどの*BSD系のOSは、ashを/bin/shとして使っている。ashはPOSIX.1(POSIX:2008)にいくらかのBSD拡張機能を取り込んだシェルだ。メモリをあまり消費せず、高速に動作し、ほかのライブラリに依存することが少ない。従って、rootやレスキューシステムのインタラクティブシェル、システムのシェルスクリプトといった場面で採用されている。 Mac OS Xはbashを/bin/shに採用している。FedoraやopenSUSEなどのLinuxディストリビューションもbashを/bin/shに採用している。LinuxディストリビューションでもUbuntuやDebian、Linux Mintなどは、高速に動作する

    シェルスクリプトはエレガントでなければならない
    qzakuq
    qzakuq 2011/11/27
  • 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.

  • 1