僅記錄自己不是很熟,又很常用的。
用 Finder 打開當前路徑的文件夾
open .建立新目錄
mkdir 目錄名刪除文件
rm 參數 文件
參數-rf 表示遞歸和強制刪除一個空目錄
rmdir dirname更改文件權限
chmod 參數 權限 文件
例:把驅動目錄下所有文件設定到root讀寫,其他用戶只讀
chmod -R 755 /System/Library/Extensions運行腳本命令
sh 腳本文件名
例 修改驅動后所有需要的操作存成一個腳本,以后修改了驅動后只要運行一次這個腳本就可以了,方便吧
終端中運行vi /clean
把下列代碼粘貼到 nano 中
rm -rf /System/Library/Extensions.kextcache
rm -rf /System/Library/Extensions.mkext
chown -R root:wheel /System/Library/Extensions
chmod -R 755 /System/Library/Extensions
diskutil repairpermissions /
kextcache -k /System/Library/Extensions/
存盤,退出
以后只要動了驅動,就在終端中運行一次 sh /clean顯示當前目錄的路徑名
pwd顯示或連接文件
cat filenametime
統計程序的執行時間
time a.out