Sign in to follow this  
Followers 0
StankDawg

TREE command?

9 posts in this topic

I have need of a command similar to the old DOS TREE command that works in solaris. I found a linux one, but it doesnt seem to support solaris.

I have been given directories to locate files from people who do not understand relative directories and directory structure in general. So I have a screen shot or a note that says "find the file in ../scripts/test/test.c" of course I don't know WTF "../scripts" could stem from!

So I would like to have a nice TREE printout of all of the directories so that I can manually eyeball it when need be.

anyone?

0

Share this post


Link to post
Share on other sites

that is linux...not solaris.

however, the linux source has a generic UNIX version to compile, and it seems to be working. So problem solved.

0

Share this post


Link to post
Share on other sites

Whoa, totally misread that. I did just read this though:

The tree command has been removed from Solaris. Although it can be useful to new users learning the UNIX command-line interface, it is not particularly useful to experienced UNIX users, and there are better tools available for those using the graphical interface. You might try using ls -R, but of course, it will not generate the hierarchical overview provided by tree.

Why remove, albeit small, functionality?

0

Share this post


Link to post
Share on other sites

yes, why indeed? It would be useful for that exact circumstance I described. And yes, also helpful as a nubie. It seems very strange...

0

Share this post


Link to post
Share on other sites

Maybe they just want to make it harder for newbs... give solaris a "pro only" feel that will give there compony a better rep for knowing what your doing.. could just be a marketing ploy.

0

Share this post


Link to post
Share on other sites

Doing the command "find /" will print out every directory from root. Replace / with another path if needed.

Also you can do "find / -name test.c -prune" to list where that file is. Change / if you do not want to use the root path to which ever path you want to use.

0

Share this post


Link to post
Share on other sites

actually, "find ." lists every FILE and DIRECTORY from the current directory indicated by the ".". I assume you meant "find /" which would be from root, but still include files as well as directories.

But that did help a little to narrow down some things.

0

Share this post


Link to post
Share on other sites

Yeah it's morning time. I edited the post to make it correct. You can use the -prune feature and some other things to hone your search in. Depends on what you want todo. Glad to help.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0