J
James E Keenan
Tad McClellan has on a couple of occasions posted the following shell
code as a quick way of generating a tree view of the content of a directory:
find . -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g'
See, for example, http://tinyurl.com/a8mmr.
I've used this many times, but now that I use Subversion a lot, it
generates too much output, because it prints out all the .svn directories.
I hacked on Tad's suggestion and came up with this, which I've placed in
my .bashrc file:
# trim: A trimmer tree
# bypassing all subdirectories whose names begin with '.'
trim ()
{
find . -not -regex '.*/\..*' -print | sed -e
's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g' | more
}
Comments?
jimk
code as a quick way of generating a tree view of the content of a directory:
find . -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g'
See, for example, http://tinyurl.com/a8mmr.
I've used this many times, but now that I use Subversion a lot, it
generates too much output, because it prints out all the .svn directories.
I hacked on Tad's suggestion and came up with this, which I've placed in
my .bashrc file:
# trim: A trimmer tree
# bypassing all subdirectories whose names begin with '.'
trim ()
{
find . -not -regex '.*/\..*' -print | sed -e
's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g' | more
}
Comments?
jimk