LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to list the directory tree? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-list-the-directory-tree-756144/)

thomas2004ch 09-18-2009 04:05 AM

How to list the directory tree?
 
I use RH Linux. I tried using the tree command to list the directory tree but failed. I was told this command doesn't exist.

Disillusionist 09-18-2009 04:08 AM

You need to install the tree package

thomas2004ch 09-18-2009 04:16 AM

How?

repo 09-18-2009 04:27 AM

try
Code:

yum install tree

Disillusionist 09-18-2009 04:30 AM

On a debian based distro you would simply type:
Code:

sudo apt-get install tree
But for Red-Hat you will use an RPM

Go to: http://rpm.pbone.net and search for the package that you want to install (if it's not on your installation media).

Once you have found the rpm file download it to your machine and install as root from th command line:
Code:

rpm -i tree-whatever.rpm
Edit:- Try repo's suggestion first.

thomas2004ch 09-18-2009 04:33 AM

Quote:

Originally Posted by Disillusionist (Post 3688264)
On a debian based distro you would simply type:
Code:

sudo apt-get install tree
But for Red-Hat you will use an RPM

Go to: http://rpm.pbone.net and search for the package that you want to install (if it's not on your installation media).

Once you have found the rpm file download it to your machine and install as root from th command line:
Code:

rpm -i tree-whatever.rpm

Where should I save the rpm file first? Anywhere I like? Or /root/tmp?

Disillusionist 09-18-2009 04:35 AM

It doesn't matter, I normally save them to /usr/local/src

The important thing is to run the rpm command from that directory.

thomas2004ch 09-20-2009 05:11 AM

Quote:

Originally Posted by Disillusionist (Post 3688264)
On a debian based distro you would simply type:
Code:

sudo apt-get install tree
But for Red-Hat you will use an RPM

Go to: http://rpm.pbone.net and search for the package that you want to install (if it's not on your installation media).

Once you have found the rpm file download it to your machine and install as root from th command line:
Code:

rpm -i tree-whatever.rpm
Edit:- Try repo's suggestion first.

I entered the key word "free" and it lists a very long list. But I couldn't find any rpm-package tree for RH EL 4 from the link you put here.

repo 09-20-2009 05:14 AM

Download the rpm
open a terminal
become root
cd to the directory where you saved the rpm
type
Code:

rpm -ivh rpmname.rpm
Once installed, you can delete the downloaded rpm

Or type
Code:

yum install tree
to install from the repo's

thomas2004ch 09-20-2009 10:10 AM

The problem is I can't find out the "tree" package from the site "http://rpm.pbone.net".

quanta 09-20-2009 10:15 AM

Quote:

Originally Posted by thomas2004ch (Post 3690618)
The problem is I can't find out the "tree" package from the site "http://rpm.pbone.net".

http://www.rpmfind.net/linux/rpm2htm...submit=Search+...

thomas2004ch 09-21-2009 01:48 AM

Quote:

Originally Posted by quanta (Post 3690621)

Thanks.

But there is no for Redhat Enterprise Linux 4.

repo 09-21-2009 04:55 AM

Did you tried
Code:

yum install tree

thomas2004ch 09-25-2009 01:54 AM

Quote:

Originally Posted by repo (Post 3691407)
Did you tried
Code:

yum install tree


Yes, but I got
Code:

-bash: yum: command not found

quanta 09-25-2009 02:17 AM

Quote:

Originally Posted by thomas2004ch (Post 3696456)
Yes, but I got
Code:

-bash: yum: command not found

http://www.rpmfind.net/linux/rpm2htm...&system=&arch=

Another way:
Code:

up2date install tree


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