1.备份
cpio
tar
dump
dd
cp
2.磁盘管理
df -h /root
du -sh /root
fdisk
mount
ex2
fscn
lvm
3.swap区建立2种方法
4.X11
5.sudo 命令配置
6.quota配置
7.find
8.umask
9. ssh sftp shttp
10. shell中ftp操作:EOC
ftp -n "$host" > "$basedir"/"$filename".log 2> "$basedir"/"$filename".log <<EOC
user $id $pw
binary
cd $remodir
put $filename
bye
EOC
(from vbird linux)
11. xargs
cat delete_file.txt |xargs rm -f
12login shell:. /etc/profile /etc/profile.d
none login shell: ~/.bash_pro
13.suid vs. sudo
sticky : files in directory with the sticky bit set can on
sgid: file created in directory with sgid bit set have group affiliations of the group of the directory
Both sgid and sticky bit are set on the group directory
14. vi
ctrl+d ctrl +u
1G
G
H M L: current screen
yy yw yl dd dw dc cc cw cl
2yy
p P
a i
!!command: output of command is inserted into file
!}command: text as input
:1,10s/sting1/sting2/g: use sed to replace sting1 witn sting2 globally from line 1 to line 10
1,$( % ): from line 1 to the lastest line
.,.+10: current line to +10
:r file read file into
:1,20w file
:set all
:set number
:se nonu
15. Magic SysRQ: http://en.wikipedia.org/wiki/Magic_SysRq_key
16.OOPS
17.User management
useradd /etc/passwd /etc/shadow /etc/group
passwd
usermod
id userid
chown
usermod -g
usermod -L
usermod -U
userdel -r username
chage
newusers filename
groupadd
groupmod
groupdel