wiki:TipAndDoc/misc

Version 9 (modified by mitty, 14 years ago) (diff)

--

mount with UUID

swapが複数あるときの優先順位

  • swapon.2
    • Each swap area has a priority, either high or low. The default priority is low. Within the low-priority areas, newer areas are even lower priority than older areas.
    • All priorities set with swapflags are high-priority, higher than default. They may have any non-negative value chosen by the caller. Higher numbers mean higher priority.
    • Swap pages are allocated from areas in priority order, highest priority first. For areas with different priorities, a higher-priority area is exhausted before using a lower-priority area. If two or more areas have the same priority, and it is the highest priority available, pages are allocated on a round-robin basis between them.
  • SWAP Priority Setting - Ubuntu Forums

mount disk image

adduser / useradd

  • adduser -> 対話式
    • /home/USERNAME が作られる
  • useradd -> 引数でオプションを与える
    • (デフォルトでは) /home/USERNAME が作られない

find コマンド

. (ドット) コマンド

  • シェルスクリプトと実行方法
    • 現在の環境変数を再設定するにはスクリプトをカレントシェルで実行しなければなりません。このためシェルにはドットコマンドと呼ばれるものが用意されおり、コマンドラインでドット .の後にスペースを置いて実行したいスクリプト名を書きます。
      $ . script
      
    • ドット .を先頭に置くことによりカレントシェルはscriptを自分自身で実行しますので、現在の環境変数を再設定することができます。なお、ドット .に続くscriptには実行権の必要はありません。

mailx

     -E      Do not send messages with an empty body.  This is useful for pip-
             ing errors from cron(8) scripts.

     -s subject
             Specify subject on command line.  (Only the first argument after
             the -s flag is used as a subject; be careful to quote subjects
             containing spaces.)

nologin / false

  • on Ubuntu lucid
  • /usr/sbin/nologin
    This account is currently not available.
    
  • /bin/false
    • nothing output