天天看點

Mac OS X 10.11 EI Capitan的常用操作

1、問:ls -l後看到一些檔案夾的屬性是drwx------@,這個@是什麼意思?

答:@是Mac OS獨有的,它的意思是告訴使用者該檔案/檔案夾還擁有擴充屬性(extended properties)。可以使用如下指令進行操作:

<code>xattr -l filename</code>

檢視檔案的擴充屬性,屬性名以long方式顯示。

2、問:檔案屬性描述資訊中,drwx------+,這個+是什麼意思?

答:+是指這個檔案納入了ACL管理。具體ACL是什麼,去查查相關資料吧。

3、使用“.”指令來重新加載檔案。

<code>. </code><code>file</code>

4、使用者權限管理

refer to the web page:

<a href="http://www.peachpit.com/articles/article.aspx?p=482338" target="_blank">http://www.peachpit.com/articles/article.aspx?p=482338</a>

5、更改hosts檔案

hosts檔案存放在/private/etc/hosts這個位置,因為EI Capitan的rootless新特性,在不解鎖root賬戶的情況下,你是無法使用root賬戶登入系統的,也就無法通路system administrator才有權限修改的hosts檔案(在可視環境下)。但是,我們仍然可以在Terminal中使用sudo nano指令來編輯hosts檔案。

第一步:先備份一下hosts檔案,以免該壞掉了無法恢複

<code>sudo</code> <code>cp</code> <code>/private/etc/hosts</code> <code>~</code><code>/backup/hosts</code>

輸入密碼後即可完成備份。其實就是把hosts檔案拷貝到另一個地方存起來。

第二步:使用nano文本編輯工具來打開hosts檔案并編輯其内容。這個nano就相當于windows裡的記事本程式,但是功能要比記事本強大的多。

<code>sudo</code> <code>nano </code><code>/private/etc/hosts</code>

第三步:在彈出的nano視窗中編輯hosts檔案的内容。編輯結束後按Control+O快捷鍵将編輯的内容寫入hosts檔案,之後就是按Control+X快捷鍵退出nano。

至此,hosts檔案編輯結束。

6、建立快捷方式(symbolic link)

ln -s source_file target_file

7、dmg或pkg安裝到Mac OS X上後,這些應用程式的檔案夾到哪裡去找?

一個應用程式(可執行)安裝完成後,你會在“應用程式”中找到一個以應用程式名稱 + .app為字尾的圖示。滑鼠右鍵點選這個圖示,選擇“顯示包内容”,然後你會看到一個檔案夾“Contents”,輕按兩下滑鼠左鍵進入Contents檔案夾,這裡就是你需要尋找的應用程式的檔案夾了。

以Netbeans為例:

Netbeans安裝完成 --&gt; Finder --&gt; 應用程式 --&gt; 輕按兩下進入Netbeans檔案夾 --&gt; 右鍵點選Netbeans.app圖示 --&gt; 選擇“顯示包内容” --&gt; 輕按兩下進入Contents檔案夾 --&gt; Resources --&gt; Netbeans --&gt; 屬于Netbeans的那些檔案及目錄就在這裡。

8. Screen capture

By region: command + shift + 4

For full screen: command + shift + 3

9. Install SVN on mac OS X

At first time, SVN has not been installed on your mac os x. You have to install it by entering svn in the terminal. After that the system may prompt you to install SVN step-by-step.

to be continue...

本文轉自 rickqin 51CTO部落格,原文連結:http://blog.51cto.com/rickqin/1745476

繼續閱讀