LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2009, 04:05 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
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.
 
Old 09-18-2009, 04:08 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
You need to install the tree package
 
Old 09-18-2009, 04:16 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
How?
 
Old 09-18-2009, 04:27 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try
Code:
yum install tree
 
Old 09-18-2009, 04:30 AM   #5
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
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.

Last edited by Disillusionist; 09-18-2009 at 04:32 AM. Reason: I must type faster!
 
Old 09-18-2009, 04:33 AM   #6
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Disillusionist View Post
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?
 
Old 09-18-2009, 04:35 AM   #7
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
It doesn't matter, I normally save them to /usr/local/src

The important thing is to run the rpm command from that directory.
 
Old 09-20-2009, 05:11 AM   #8
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Disillusionist View Post
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.
 
Old 09-20-2009, 05:14 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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

Last edited by repo; 09-20-2009 at 05:15 AM.
 
Old 09-20-2009, 10:10 AM   #10
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
The problem is I can't find out the "tree" package from the site "http://rpm.pbone.net".
 
Old 09-20-2009, 10:15 AM   #11
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by thomas2004ch View Post
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+...
 
Old 09-21-2009, 01:48 AM   #12
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by quanta View Post
Thanks.

But there is no for Redhat Enterprise Linux 4.
 
Old 09-21-2009, 04:55 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Did you tried
Code:
yum install tree
 
Old 09-25-2009, 01:54 AM   #14
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by repo View Post
Did you tried
Code:
yum install tree

Yes, but I got
Code:
-bash: yum: command not found
 
Old 09-25-2009, 02:17 AM   #15
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by thomas2004ch View Post
Yes, but I got
Code:
-bash: yum: command not found
http://www.rpmfind.net/linux/rpm2htm...&system=&arch=

Another way:
Code:
up2date install tree
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wxPython: sortable tree list control? BrianK Programming 1 07-17-2008 04:25 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
Utility Needed - list folder tree and files in text file Optiker Linux - Software 21 11-17-2006 02:46 PM
permissions for directory tree adamwenner Linux - Security 3 10-23-2004 07:39 AM
Directory Tree Question GreatMilenko Linux - Security 3 06-02-2002 01:48 PM


All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration