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?
TREE command?
Started by
StankDawg
, May 14 2003 01:41 PM
8 replies to this topic
#1
Posted 14 May 2003 - 01:41 PM
#2
Posted 14 May 2003 - 07:51 PM
No sarcasm at all, I think the "tree" command will do the trick. Here's the man page:
http://nodevice.com/...ex/man1826.html
http://nodevice.com/...ex/man1826.html
#3
Posted 15 May 2003 - 12:02 AM
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.
however, the linux source has a generic UNIX version to compile, and it seems to be working. So problem solved.
#4
Posted 15 May 2003 - 12:14 AM
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?
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?
#5
Posted 15 May 2003 - 08:17 AM
yes, why indeed? It would be useful for that exact circumstance I described. And yes, also helpful as a nubie. It seems very strange...
#6
Posted 15 May 2003 - 07:06 PM
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.
#7
Posted 19 May 2003 - 09:38 AM
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.
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.
#8
Posted 19 May 2003 - 10:08 AM
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.
But that did help a little to narrow down some things.
#9
Posted 19 May 2003 - 10:32 AM
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.
BinRev is hosted by the great people at Lunarpages!












