Help with Terminal

laurenf

Registered
Hi,

In Windows (shhh!), when you're in the command line, you can use the "tree" command to show the structure of the directory you're currently in (or "map" it). So it lists the folder you are in with all of its subfolders, and all of their subfolders, etc.

How do I do something similar in Mac OS X? I imagine there must be some command in terminal that I don't know that achieves this. But ls -a is not sufficient because it only displays the folders at the top level of that directory. thoughts? And if this can be executed on Volumes as well, even better.

Thanks!
Lauren
 
lsof lists files presently open wish is not what I think the OP wants, try ls -lR and see if that does what you want. The R makes it recursive.
 
There is a Package"tree" in Darwinports.

You have to install Darwinports, a Project to bring UNIX Programs to OS X. From there you can install "tree", which you are longing for.

It may sound complicated, but you get a lot more than just tree when you start to check out Darwinports!

Enjoy!
 
Open a Terminal, cd into the directory you want and type:

find .

To quit the process type Cntrl+C

If you want to write all that output into a text file type:

find . >> /path/to/file.txt

The file will be made and doesn't have to preexist.
 
Back
Top