LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tree command? (https://www.linuxquestions.org/questions/linux-newbie-8/tree-command-610139/)

admad1 12-31-2007 08:07 AM

Tree command?
 
Hi Guys what is the equivalent of the DOS tree command
Quote:

tree | more
in lunix I want to explore directories and files on my Centos 5 distro but cant find which command to list all directory's on the system I've downloaded the Centos 4 - 5 manuals but cant see it.

I can use
Quote:

ls -all
in the current directory and can change directory but cant see what directories I have to change to

cheers
Andy

ghostdog74 12-31-2007 08:17 AM

its tree too.
you can also explore your file systems using find command.
man find or info find on your system to find out more

{BBI}Nexus{BBI} 12-31-2007 08:22 AM

Try ls -R | more to see all subdirectories & files within those directories. If you just want to see what subdirectories there are do ls.

admad1 12-31-2007 08:22 AM

Quote:

Originally Posted by ghostdog74 (Post 3006630)
its tree too.
you can also explore your file systems using find command.
man find or info find on your system to find out more

Lol.. I never thought to try that. However I'm logged in as root at the command line and typing
Quote:

tree
just gives me 3 files anacanda-ks.cfg
install.log
install.log.sys

Is there a way of listing the whole directory structure across a drive

Andy

admad1 12-31-2007 08:36 AM

Quote:

Originally Posted by {BBI}Nexus{BBI} (Post 3006635)
Try ls -R | more to see all subdirectories & files within those directories. If you just want to see what subdirectories there are do ls.

Thanks Guys. Nexus I see a link to webmin in your post I'm downloading it now. Is it easy to install to my centos 5 server?

Cheers
Andy

{BBI}Nexus{BBI} 12-31-2007 08:40 AM

It should be straight forward. You might want to check if it's already in you repo list and install it from there to avoid any potential dependency issues. :)

ghostdog74 12-31-2007 08:57 AM

Quote:

Originally Posted by admad1 (Post 3006636)
Lol.. I never thought to try that. However I'm logged in as root at the command line and typing just gives me 3 files anacanda-ks.cfg
install.log
install.log.sys

Is there a way of listing the whole directory structure across a drive

Andy

if you want to use tree, you can download and install. However, if you can't download and install, you can use find. Eg of the simplest syntax of find you can get.
Code:

# find / -print
or
# find / -ls

like i said before, check the man page of find (or ls) for more info

pwc101 12-31-2007 09:11 AM

Quote:

Originally Posted by admad1 (Post 3006636)
However I'm logged in as root at the command line and typing just gives me 3 files anacanda-ks.cfg
install.log
install.log.sys

Is there a way of listing the whole directory structure across a drive

Code:

tree / | more
should do it.

admad1 12-31-2007 10:00 AM

Quote:

Originally Posted by pwc101 (Post 3006678)
Code:

tree / | more
should do it.

Thats the one. Cheers although I seem to be stuck with a us keyboard and cant add the |more part of the syntax.

How do I change the keyboard language?

Cheers
Andy

pwc101 12-31-2007 02:04 PM

It depends on your desktop environment (KDE, Gnome, XFCE, fluxbox etc.). Google will have answers for each one, so do a quick search and see :)

In KDE (which is what I have to hand) you'd open the Control Centre via the K-menu > Settings, then go to Regional and Accessibility, then go to Keyboard Layout, and select the appropriate keyboard layout there. I imagine it's not that different in Gnome.

You can also change it for your ttys using the loadkeys command, although I've never used it, since I always select a UK keyboard layout during installation :)


All times are GMT -5. The time now is 10:34 AM.