Koozali.org: home of the SME Server

tree command.

Offline Jon-0x25

  • *
  • 6
  • +0/-0
tree command.
« on: January 05, 2010, 04:21:50 PM »
Hi,

I've been searching various forums for the past few hours and have not been able to find out how I can get the command line utility tree installed. I've found all sorts of pointers but none have been sucessfull on my basic 7.4 setup.

Unfortunately I'm fairly new to Linux and am at a loss. Can someone be so kind as to point me in the right direction.

Many thanks.

Offline warren

  • *
  • 293
  • +0/-0
Re: tree command.
« Reply #1 on: January 05, 2010, 05:22:37 PM »
ttdriver,

you can access / use the "tree" command if from the command line you type "
Code: [Select]
  htop
once htop is running, you can use the tree command by typing "F5"

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: tree command.
« Reply #2 on: January 05, 2010, 06:14:11 PM »
once htop is running, you can use the tree command by typing "F5"

That shows a tree of processes. OP wants the tree command, which, in DOS, shows a tree of directories and files.

'find' and 'ls -R' will show a tree of directories and files, but not in exactly the same format as 'tree'. 'tree' is a DOS utility, and in general is not part of linux, although a port is available if you search hard enough.

Offline Jon-0x25

  • *
  • 6
  • +0/-0
Re: tree command.
« Reply #3 on: January 05, 2010, 06:23:41 PM »
The reason I could do with the tree command rather than something like midnight commander is it is used extensively in some scripts I've inherrited to look after for building tables of files, their sizes and pulling them all together into hyperlinks. I didn't realise it was a port from DOS though, that makes me feel old. :sad:

Perhaps I must embark on re-writing the scripts if I can't get an output similar to "tree -ifs". Will keep me busy for a while there are over 350 scripts to sort through.

I was hoping it would be a simple case of "yum install tree" (Which I have tried and searched against).  I guess life isn't so simple.  :-)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: tree command.
« Reply #4 on: January 05, 2010, 06:51:47 PM »
I was hoping it would be a simple case of "yum install tree"

It would be if SME server was based on Fedora Core. AFAIK, nobody has built a tree rpm for RHEL/CentOS4.

Offline Jon-0x25

  • *
  • 6
  • +0/-0
Re: tree command.
« Reply #5 on: January 05, 2010, 07:29:24 PM »
That explains it then - the old server was version 5.1 (I think) the hardware went bang in a spectacular fashion. :sad:

Thanks for the help though guys, if I manage to find a port somewhere I'll post back on this thread just in case someone else is searching.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: tree command.
« Reply #6 on: January 05, 2010, 07:41:19 PM »
« Last Edit: January 05, 2010, 07:47:24 PM by CharlieBrady »

Offline Jon-0x25

  • *
  • 6
  • +0/-0
Re: tree command.
« Reply #7 on: January 05, 2010, 07:55:44 PM »
You are quiet clearly a star.

Thankyou very much for your help and obviously much superior searching skills.

Hopefully one day I may be able to repay the debt.
 :D

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: tree command.
« Reply #8 on: January 05, 2010, 08:09:10 PM »
Thankyou very much for your help and obviously much superior searching skills.

It wasn't just searching - I built the rpm for you.

Quote
Hopefully one day I may be able to repay the debt.

You can send beer or RAM.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: tree command.
« Reply #9 on: January 05, 2010, 10:17:56 PM »
CharlieBrady

Quote
I built the rpm for you.

Good man Charlie.
I think the expression goes something like:
Do unto others as you would like them to do unto you.

I think Charlie does more for "all of us" than we could ever do for him !
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Jon-0x25

  • *
  • 6
  • +0/-0
Re: tree command.
« Reply #10 on: January 06, 2010, 07:56:33 PM »
It wasn't just searching - I built the rpm for you.

You can send beer or RAM.

Many thanks - we are a bit short of RAM's plenty of sheep though.  :grin:

I'll look in the fridge to check the beer situation.