快捷鍵
Command + Del :將文件放入廢紙簍
Command + Shift + 4 :屏幕截圖
Terminal
ls的含義是“l(fā)ist directory contents”,它會(huì)列出當(dāng)前目錄的內(nèi)容
cd的含義是“change directory”,它會(huì)改變當(dāng)前目錄到你指定的目錄
pwd的含義是“print working directory”,會(huì)顯示當(dāng)前目錄的絕對(duì)路徑
查找當(dāng)前目錄下擴(kuò)展名為cpp的文件
find . -name "*.cpp"
使用系統(tǒng)默認(rèn)程序打開文件
open main.cpp
chmod
chmod = “change mode”,改變文件的訪問屬性。
chmodoptionspermissionsfile name
chmod u=rwx,g=rx,o=r filename
1.theuser canread,write, andexecute it;
2.members of yourgroup canread andexecute it
3.others may onlyread it
also chmod 754 filename
4stands for "read",
2stands for "write",
1stands for "execute", and
0stands for "no permission."
列出文件的訪問權(quán)限
ls -l filename
admindeiMac-2:Release du$ ls -l Matrix
-rwxr-xr-x@ 1 du? staff? 127264? 8 22 11:45 Matrix
擁有者權(quán)限,用戶組權(quán)限,全體成員
活動(dòng)監(jiān)視器
使用活動(dòng)監(jiān)視器“磁盤”選項(xiàng)卡可以看到磁盤讀寫速度。
使用Terminal指令測試硬盤讀寫速度
time dd if=/dev/zero bs=2048k of=tstfile count=512
1073741824 bytes transferred in 12.969234 secs (82791461 bytes/sec)
time dd if=tstfile bs=1024k of=/dev/null count=1024
1073741824 bytes transferred in 12.810657 secs (83816296 bytes/sec)
使用的這臺(tái)iMac(2017iMac)讀寫都在80MB每秒,磁盤為機(jī)械硬盤轉(zhuǎn)速5400轉(zhuǎn)每秒。
有的iMac配固態(tài)硬盤或者混合硬盤。
查詢CPU型號(hào)
sysctl?machdep.cpu.brand_string