| 李波's profilekpld's SpacePhotosBlogLists | Help |
|
9/29/2009 close monitor under LinuxIn X:
xset dpms force off
In console:
if [ ${TERM} = "linux" ]; then
setterm -blank 1 -powersave powerdown
fi
These need ACPI support, you can use cmd:
cat /proc/acpi/info
to verify this feature.
This cmd should show "version: 20081214" similar string. 9/27/2009 Argument list too long error in shell and solutionuse cmd "getconf ARG_MAX" to get this limit
this macro is defined in "include/linux/limits.h"
solution:
1.
find /path/ |xargs -n 100 rm
2.
for fileset in a b c d e f g h i j k l m n o p q r s t v w x z
do /bin/rm $fileset* done 3.
ls|xargs rm
4. modify kernel at "include/linux/binfmts.h"
#define MAX_ARG_PAGES 32 // modify 32 to larger
9/13/2009 nptl的问题我的显卡是R300系列,用的开源ati驱动,glxgear跑不起来,3D游戏也不能玩。google了半天,说是去掉nptl这个USE,只好这样。重新emerge了一下,需要编译gcc、mesa、xorg-server这三个包。 弄完之后,glxgear了一下,2300多分,相当不错。马上打开glest,果然比较流畅。 查了下nptl,Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually),这个怎么会影响显卡驱动效果呢?不解。 9/11/2009 Magic System Request查看:cat /proc/sys/kernel/sysrq
设置:CONFIG_MAGIC_SYSRQ
R-E-I-S-U-B 这个序列的推荐使用方式是:R – 1 秒 – E – 30 秒 – I – 10 秒 – S – 5 秒 – U – 5 秒 – B,而不是一气呵成地按下这六个键
说明:
R - 把键盘设置为 ASCII 模式
E - 向除 init 以外所有进程发送 SIGTERM 信号
I - 向除 init 以外所有进程发送 SIGKILL 信号
S - 磁盘缓冲区同步
U - 重新挂载为只读模式
B - 立即重启系统 user & group commandnewgrp: change primary group ID to exec command
sg group -c command: change group ID to exec command
vigr: edit /etc/group
vipw: edit /etc/passwd
groups: show groups of user
pwck: verify passwd file
grpck: verify group file
setfacl: set file acl
getfacl: get file acl
9/4/2009 screen的高级用法:multiuser要使用multiuser模式,首先必须
# chmod u+s /usr/bin/screen
user1:
screen -S window1
Ctrl+a
:multiuser on
:acladd user2
:aclchg user -w "#"
Ctrl+a Ctrl+d
user2:
screen -r user1/window1
这样user1在屏幕上操作的步骤,user2就能看到了,而且user2去掉了"写"权限,他只能看user1操作,退出使用Ctrl+a Ctrl+d键。
9/2/2009 useful unix command1. apropos ;;lookup command
2. pgrep ;;find process
3. pwgen ;;generate secure password
4. multitail ;;view multi files
5. zcat,zgrep,zless,zdiff ;;operator compressed file directly, without uncompress them |
|
|