Is there a command like 'tree' to list the directory structure in RHEL 4.

Solution Verified - Updated -

Issue

Issue:

Missing "tree" command in RHEL 4.

Enivorment :

Red Hat Enterprise Linux 4

Resolution :

The 'tree' command is not available in RHEL 4. We have a feature request already filed for the same.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=152254.But it was rejected.


Workaround:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'

Use above command/script  to list the directory structure in rhel 4.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.