#
%s/\[.*\]//g 将[与]之间的所有的东西都删掉
#
z RETURN
z.
z-
将当前行设为首,中,尾
#
sudo mkfs.ext3 -b 4096 -i 8192 /dev/hda6
sudo tune2fs -l /dev/hda6
#
find . -type f -print | xargs grep note ;在所有的文件夹下找文件名含note的文件
xargs与 -exec作用相同
#
find ~ -newer "/etc/passwd" -print0|xargs -0 ls
而且,这个newer默认比较的是last modification time吧?
#
find / -name not*
find . -name "te*" | cpio -pud download;p 从管道复制,d需要时创建目录,u无条件复制
#
du -s * | sort -rn
du -hms * | sort -rn
df | awk '{print $5"\t"$6}';后一个为显示5 6列
date | awk '{printf "%s@%s-%s',$4,$6,$2,$3}';与print有相同的用法
#
find / -xdev -name core -atime +3 -print 查找三天内未使用的core文件
find / -local -name core -exec rm -f {} ';'
find ./ -type f -exec grep modification {} ';';在文件中找modification并将文件中的这一行输出
#
ps -ef | grep vim;查找与vim有关的进程
kill -9 pid 杀死一个进程
#
cp -p 保留属性
#
查找多个关键词
grep find mycommond | grep type;在mycommond中查找有find 与type的一行
egrep '(find | type)' mycommond;与上面的功能相同


水到渠成 于 2011-12-26 10:52:57发表:
新手,看不懂
SongXu 于 2011-12-23 20:47:33发表:
学习了
ma-ml 于 2011-12-23 16:49:12发表:
感觉好迷或
yuxiangzhang 于 2011-12-22 18:35:21发表:
多谢 又长进了
vb99 于 2011-12-17 14:33:09发表:
{:2_92:}