UNIX (FreeBSD) - tree - 隠しファイル
- 1. 概要
- 2. 表示
1. 概要
「tree」は、デフォルトでは、隠しファイル、「Linux」では、「.(ドット)」で始まるファイルは、表示しません。
つい最近まで、うっかりこのことを忘れちゃっていました。
気づいたのは、「Rust」で「cargo」によるビルドを行ったときのことです。
2. 表示
「Rust」の「cargo」によるビルドを行うと、「.git」というディレクトリと「.gitignore」というファイルが同時に作成されます。
ビルド後の状況を「tree」で表示すると
hello_world/
|-- Cargo.lock
|-- Cargo.toml
|-- src
| `-- main.rs
`-- target
|-- CACHEDIR.TAG
`-- debug
|-- build
|-- deps
| |-- hello_world-7bfb95fddec9c2f8
| `-- hello_world-7bfb95fddec9c2f8.d
|-- examples
|-- hello_world
|-- hello_world.d
`-- incremental
`-- hello_world-xi5wb5f4hc0j
|-- s-gbyyqn2xyb-1g4i9iy-3uq7ikb1po8yg
| |-- 1d7hbqnt5t89r8o9.o
| |-- 1u6usfkoryhlwuto.o
| |-- 24td2griif9mg94m.o
| |-- 2zm0vfiwz1rxssvj.o
| |-- 3kwbhxw55uzxgwid.o
| |-- 3tl4prjstlgc7qgy.o
| |-- 3vgotgn4mqyoh6am.o
| |-- dep-graph.bin
| |-- query-cache.bin
| |-- r93ifovkcrlnny5.o
| `-- work-products.bin
`-- s-gbyyqn2xyb-1g4i9iy.lock
てな感じであります。
「tree」で、隠しファイルを表示するには「-a」オプションをつけます。
tree -a hello_world
hello_world
|-- .git
| |-- config
| |-- description
| |-- HEAD
| |-- hooks
| | `-- README.sample
| |-- info
| | `-- exclude
| |-- objects
| | |-- info
| | `-- pack
| `-- refs
| |-- heads
| `-- tags
|-- .gitignore
|-- Cargo.lock
|-- Cargo.toml
|-- src
| `-- main.rs
`-- target
|-- .rustc_info.json
・・・ 以下略 ・・・
てな感じ。
|
|