Archive for 10th January, 2007

Linux Console 分辨率设置

10th January, 2007

在grub menu list文件的kernel行尾加 vga=value,比如:

  1. title           Ubuntu, kernel 2.6.15-23-386
  2. root            (hd0,0)
  3. kernel          /boot/vmlinuz-2.6.15-23-386 root=/dev/hda1 ro quiet splash  vga=791
  4. initrd          /boot/initrd.img-2.6.15-23-386
  5. savedefault
  6. boot

这个vga的值究竟是多少,可以参看下表:

色深
640×480 800×600 1024×768 1280×1024
256
769 771 773 775
32000 784 787 790 793
65000 785 788 791 794
16.7 Mill. 786 789 792 795

几个Shell的特殊参数

10th January, 2007
  1. $0      = shell名称或shel脚本名称
  2. $1      = 第一个(1)shell参数
  3.     ...
  4. $9      = 第九个(9)shell参数
  5. $#      = 位置参数的个数
  6. "$*"    = "$1 $2 $3 $4 ... $n"
  7. "$@"    = "$1" "$2" "$3" "$4" ... "$n"
  8. $?      = 最近执行的命令的退出状态
  9. $$      = 当前shell脚本的PID
  10. $!      = 最近启动的后台作业的PID