常用的shell指令 Jan 24th, 2013 1.合并所有lst文件,排序,去重,输出到my.list Scripts collections1 cat *.lst|sort|uniq > my.list #合并排序去重 2.使用tar拷贝目录下的所有文件 Copy all files1 2 3 4 5 6 7 (cd /source/directory && tar cf - .)|(cd /dest/directory && tar xpvf -) cd source/directory tar cf - . |(cd /dest/directory; tar xpvf -) cp -a /source/directory/* /dest/directory cp -a /source/directory/* /source/directory/.[^.]* /dest/directory Using tar1 bunzip2 linux-2.6.13.tar.bz2 | tar xvf -