quinta-feira, 24 de junho de 2010

Comando TREE para Linux

Quick, what does the following Unix/Linux command do?
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
If you said, “Well, that’s obvious; it shows a graphical representation of the current sub-directories.“, you’d be correct.
Here’s the command ready-to-go in a shell script: tree.sh

Sem comentários:

Enviar um comentário