目次
ディレクトリまたはファイルをツリー構造で表示する方法。
書式
find [対象PATH] -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/+--+/| +/g;s/+--+/|
実行例(/etc配下を表示)
# find /etc -type d|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/+--+/| +/g;s/+--+/| +/g;s/+--|/| |/g;p' | +--ConsoleKit | | +--run-seat.d | | +--run-session.d | | +--seats.d | +--NetworkManager | | +--dispatcher.d | +--X11 <以下略>
書式
find [対象PATH] -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g;s/+--+/| +/g;s/+--+/|
実行例(/etc配下を表示)
# find /etc -type f|sort|sed -ne'1b;s/[^\/]*\//+--/g;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 <以下略>