Mac OX 隱藏檔案夾,檔案,應用,磁碟的2種方法 hide finder folder, file, application, volume in 2 ways

來源:互聯網
上載者:User

標籤:

經常需要主目錄下隱藏一些檔案夾之類的,

第一想到的當然就是:在要隱藏的檔案夾前面加『.』(leading dot),這個用法當然可以的了

用習慣了Linux/GNU系統的,基本習慣使用這種辦法

但是,我發現 Mac種/Users/$USER/目錄下的Library就是隱藏的,但是並沒有leading dot,說明

Mac種有除了leading dot之外的其他隱藏目錄的方法

1.使用OnyX,這個是GUI形式的 [在Utilities->Visibility下面]

 

2.使用命令參數設定(對檔案夾,檔案)

chflags hidden <檔案[夾]路徑>    #隱藏檔案夾{finder中看不到}

chflags nohidden <檔案[夾]路徑> #去掉隱藏屬性{finder中看不到}

 

可以檢驗一下

用chflags hidden fgh.txt [檔案]

finder看不到了

chflags hidden Backup [檔案夾]

finder看不到

當然,如果你常用Terminal的話,自然ls是不參考這個屬性的,這樣隱藏的檔案[夾]是會顯示的,ls是識別leading dot的這種方式的

 

Reference:

1. http://www.cnblogs.com/lm3515/archive/2010/12/08/1900271.html

2. http://wenku.baidu.com/view/86f0e059804d2b160b4ec0da.html

Mac OX 隱藏檔案夾,檔案,應用,磁碟的2種方法 hide finder folder, file, application, volume in 2 ways

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.