ディレクトリのツリー表示
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
目次~
#contents
**概要 [#e5adcc79]
ディレクトリまたはファイルをツリー構造で表示する方法。
**findを使用 [#s102cc9e]
***ディレクトリのツリー構造 [#qe89cda5]
書式~
find [対象PATH] -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g...
実行例(/etc配下を表示)~
# find /etc -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/...
| +--ConsoleKit
| | +--run-seat.d
| | +--run-session.d
| | +--seats.d
| +--NetworkManager
| | +--dispatcher.d
| +--X11
<以下略>
***ファイルをツリー構造で表示 [#bc1c934c]
書式~
find [対象PATH] -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g...
実行例(/etc配下を表示)~
# find /etc -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/...
+/g;s/+--|/| |/g;p'
| | | +--00-primary.seat
| +--DIR_COLORS
| +--DIR_COLORS.256color
| +--DIR_COLORS.lightbgcolor
| | | +--00-netreport
| | | +--05-netfs
| | | +--10-dhclient
| +--Trolltech.conf
<以下略>
終了行:
目次~
#contents
**概要 [#e5adcc79]
ディレクトリまたはファイルをツリー構造で表示する方法。
**findを使用 [#s102cc9e]
***ディレクトリのツリー構造 [#qe89cda5]
書式~
find [対象PATH] -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g...
実行例(/etc配下を表示)~
# find /etc -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/...
| +--ConsoleKit
| | +--run-seat.d
| | +--run-session.d
| | +--seats.d
| +--NetworkManager
| | +--dispatcher.d
| +--X11
<以下略>
***ファイルをツリー構造で表示 [#bc1c934c]
書式~
find [対象PATH] -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g...
実行例(/etc配下を表示)~
# find /etc -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/...
+/g;s/+--|/| |/g;p'
| | | +--00-primary.seat
| +--DIR_COLORS
| +--DIR_COLORS.256color
| +--DIR_COLORS.lightbgcolor
| | | +--00-netreport
| | | +--05-netfs
| | | +--10-dhclient
| +--Trolltech.conf
<以下略>
ページ名: