首先把hdb mount起来
Mount /dev/hdb1 /mnt/hdb
用df –k看,大小为576M
可以看到dev目录下是空的
先全部复制到2G盘上(免得以后再挂双硬盘)
Cd /root
Cp –cpR /mnt/hdb .
卸载hdb,留待以后可以进一步缩减
通过sftp把相关脚本先传上去cp_and_rm.sh
开始裁剪,首先运行cp_and_rm.sh
少了misc和initrd两个目录
得到的目标目录有156M之多
超过了原作者说的80M
接下来复制usr目录 cp_usr.sh,少了一些命令(最小版没有)
[root@locent5old ~]# ./cp_usr.sh
cp: cannot stat `/usr/share/nmap': No such file or directory
cp: cannot stat `/usr/bin/ftp-rfc': No such file or directory
cp: cannot stat `/usr/bin/nmap': No such file or directory
cp: cannot stat `/usr/sbin/traceroute': No such file or directory
cp: cannot stat `/usr/sbin/traceroute6': No such file or directory
cp: cannot stat `/usr/sbin/vsftpd': No such file or directory
cp: cannot stat `/usr/sbin/x86info': No such file or directory
cp: cannot stat `/usr/lib/libslang-utf8.so.*': No such file or directory
cp: cannot stat `/usr/lib/libwrap.so.*': No such file or directory
[root@locent5old ~]#
一共177M,虽然大了点(例如selinux,我感觉完全可以去掉)