views:

81

answers:

2

How do I make a tree of all things with bash? What is the command?

+3  A: 
tree /

or

find / 

Update: @OP, since you have so much trouble with it, how about this alternative. On ubuntu 9.10, you should have bash 4.0 ? so try this

#!/bin/bash
shopt -s globstar
for rdir in /*/
do
    for file in $rdir/**
    do
      echo "$file"
    done
done
ghostdog74
none of them work...i'm using virtual machine, could be that?tree / says that is not installed
pedro
If tree isn't installed on your Ubuntu machine use: `sudo aptitude install tree`
Ben S
you don't even have find??
ghostdog74
the same...0 packages installed :S
pedro
findutils is a dependency of libc6, which many, many core packages (including apt!) depend on. And Ben gave correct instructions for installing `tree`. So I'm not sure what's going on.
Matthew Flaschen
says "couldn't find package "tree""...
pedro
The tree package (http://packages.ubuntu.com/karmic/tree) is part of the universe packages, which might not be enabled. I would ask this question on the Ubuntu forums as it's not strictly programming related and they would likely already have resources to point you towards to help you out.
Ben S
+1  A: 

tree -R /

and then cry because it's enormous.

On a related note, to stop the command, press CTRL+C

Ben S
says that tree is not installed
pedro
Like I commented to ghostdog74's answer, install it with this command: `sudo aptitude install tree`
Ben S
i already try to install...after i write tree and says is not installed
pedro