[macOS General] chflags: Finder に表示しない不過視ファイルを指定する

BSD 由来のコマンド。

[markdown]
こちらを眺めていて知りました。

> * [bash – Sublime Text 2 – OS X Command Line – Stack Overflow](http://stackoverflow.com/questions/13655343/sublime-text-2-os-x-command-line)

Home フォルダに bin/ を作ったときに、Finder で見えると操作しづらい。
という場合にこんなコマンドを実行する。

“`prettyprinted
% chflags hidden ~/bin
% open ~/
“`

> * [chflags(1) Mac OS X Manual Page](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/chflags.1.html)

`ls` に `-O` オプションをつけると、不過視属性も確認できる。

“`prettyprinted
% ls -lO
total 0
drwxr-xr-x 29 **** staff – 986 4 2 17:37 Applications/
drwx——+ 4 **** staff – 136 4 2 18:42 Desktop/
drwx——+ 4 **** staff – 136 4 2 17:05 Documents/
drwx——+ 10 **** staff – 340 4 2 18:36 Downloads/
drwx——@ 21 **** staff – 714 3 28 13:56 Dropbox/
drwx——@ 55 **** staff hidden 1870 3 27 13:43 Library/
drwx——+ 3 **** staff – 102 3 10 19:57 Movies/
drwx——+ 4 **** staff – 136 3 25 20:23 Music/
drwx——+ 13 **** staff – 442 3 27 13:49 Pictures/
drwxr-xr-x+ 5 **** staff – 170 3 10 19:57 Public/
drwxr-xr-x 3 **** staff – 102 3 20 21:01 VirtualBox VMs/
drwxr-xr-x@ 3 **** staff hidden 102 3 19 14:49 bin/
drwxr-xr-x 12 **** staff – 408 4 1 19:38 dotfiles/
drwxr-xr-x 4 **** staff – 136 3 18 16:52 perl5/
drwxr-xr-x 15 **** staff – 510 3 25 20:49 projects/
“`

> * [気まぐれノート: Mac OS X (Lion) のファインダーで隠しファイルを表示する](http://pettyconan.blogspot.jp/2011/10/mac-os-x-lion.html)
[/markdown]