快捷键
Command + Del :将文件放入废纸篓
Command + Shift + 4 :屏幕截图
Terminal
ls的含义是“list directory contents”,它会列出当前目录的内容
cd的含义是“change directory”,它会改变当前目录到你指定的目录
pwd的含义是“print working directory”,会显示当前目录的绝对路径
查找当前目录下扩展名为cpp的文件
find . -name "*.cpp"
使用系统默认程序打开文件
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."
列出文件的访问权限
ls -l filename
admindeiMac-2:Release du$ ls -l Matrix
-rwxr-xr-x@ 1 du staff 127264 8 22 11:45 Matrix
拥有者权限,用户组权限,全体成员
活动监视器
使用活动监视器“磁盘”选项卡可以看到磁盘读写速度。
使用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)
使用的这台iMac(2017iMac)读写都在80MB每秒,磁盘为机械硬盘转速5400转每秒。
有的iMac配固态硬盘或者混合硬盘。
查询CPU型号
sysctl machdep.cpu.brand_string
网友评论