#!/bin/sh # dtree : print a hierarchy tree starting at specified directory # Usage: dtree # dtree mydir (cd ${1-.};pwd); find ${1-.} -print | sort -f | sed -e "s,^${1-.},," -e "/^$/d" -e "s,[^/]*/\([^/]*\)$,\`---\1," -e "s,[^/]*/,| ,g" #To just show directories, add the -type d option to find #find ${1-.} -type d -print | sort -f | sed -e "s,^${1-.},," -e "/^$/d" -e "s,[^/]*/\([^/]*\)$,\`---\1," -e "s,[^/]*/,| ,g"