From: utzoo!decvax!harpo!eagle!mhuxt!mhuxa!mhuxh!mhuxm!pyuxjj!pyuxqq!ral Newsgroups: net.unix-wizards Title: A version of dirtree written in shell Article-I.D.: pyuxqq.113 Posted: Sat Jan 15 16:50:02 1983 Received: Tue Jan 18 02:55:43 1983 I wrote a dirtree-like command several years ago that I still use. It's a shell procedure that merely filters the find(1) command by removing the chaff. The "improvement" suggested in the "dirtree revisited" Article cwruecmp.404, by cwruecmp!ordy, suggests a lot of output that would quickly scroll off the screen. DIR=${1-.} find ${DIR} -print | sort | \ sed -e "s!^${DIR}\$!!" \ -e "s!${DIR}/!!" \ -e 's:[^/]*/: :g' \ #replace chaff with a tab -e '/^$/d' The sort can be omitted if you don't need files in a directory to be listed in lexical order.