一、修改test目錄下文件夾及子文件夾權限爲755(遞歸調用)
#
find /home/wwwroot/test -type d -exec chmod 755 {} \;
二、修改test目錄下文件及子文件夾下文件權限爲644(遞歸調用)
#
find /home/wwwroot/test -type f -exec chmod 644 {} \;
三、快速刪除日誌文件
#
ls | xargs rm -f
四、網絡對時
#
ntpdate time.nist.gov
五、生成服務器私鑰和生成服務器證書請求
#cd /usr/local/etc/apache22
#openssl genrsa 1024 > server.key
#chmod 400 server.key
#openssl req -new -key server.key -x509 -days 365 -out server.crt
六、打包已經安裝的Ports
#
pkg_create -b /var/db/pkg/rsync-3.0.6