Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Jul 2014, 09:48
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Tree - shows directory contents in expanded tree format
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
TrailerTrash


Joined: 29 Jan 2008
Posts: 61

PostPosted: Tue 19 Feb 2008, 13:18    Post subject:  Tree - shows directory contents in expanded tree format  

[This post copied from here and the off-topic parts of that thread moved to make this thread, by Flash on 8-17-08]

Bruce B wrote:
TrailerTrash wrote:

Is there one picture somewhere that shows the entire "tree" and everything in it in plain language.



Yes and no.

There is a tree program which is not included with Puppy. I've attached it to this post.

To install.

Download tree.gz
Navigate to download directory in ROX then
open console and type these commands.

Or open console and navigate to download directory using the cd command. That's how I'd do it.

# gzip -d tree.gz
# mv tree /usr/bin

To learn more about tree's switches and options

# tree --help

(a fairly comprehensive list of options for such a small utility, hope you all enjoy)
tree.gz
Description 
gz

 Download 
Filename  tree.gz 
Filesize  15.17 KB 
Downloaded  826 Time(s) 
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Tue 19 Feb 2008, 16:47    Post subject:  

Thanks, Bruce, "tree" looks like it might be what I've been searching for to solve a problem. I want the authors and books in my mp3 books directory to show in tree format without my having to click on each author's name, but I don't want the mp3 files to show.

By the way, the program installed as "tree-1" for me. (That's what I had to type in the console to get it to run.) But all is well; I went into /usr/bin and changed the name to "tree" and now it opens when I type tree in a console.

_________________
Puppy Help 101 - an interactive tutorial for Lupu 5.25
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Wed 20 Feb 2008, 14:32    Post subject:  

Perhaps I should start a new thread to discuss tree, but I'll stay with this one for now.
Code:
tree -L 2
displays the contents of my mp3 book directory exactly the way I want:
Quote:
# tree -L 2
.
|-- Arendt, Hannah
| `-- The Origins Of Totalitarianism
|-- Bodansky, Yossef
| `-- Chechen Jihad
|-- Donald, Aida D.
| `-- T.R., Lion in the White House (A)
|-- Dostoyevsky, Fyodor
| `-- Crime and Punishment
|-- Johnson,_Chalmers
| |-- Blowback
| `-- The Sorrows of Empire
|-- Klavan, Andrew
| `-- Damnation Street
|-- Levine, Paul
| `-- The Deep Blue Alibi
|-- McCall, Nathan
| `-- Them (A+)
`-- Short Science Fiction Collection 001
|-- Bread Overhead by Fritz Leiber.mp3
`-- The 4D Doodler by Graph Waldeyer.mp3

18 directories, 2 files

It would be nice if the font was more readable than the one in rxvt. One of the options for tree,
Quote:
--charset X Use charset X for HTML and indentation line output.
seems to imply that it can display in HTML. I don't have a clue how to use that option in Puppy. What do I enter for X?
Back to top
View user's profile Send private message 
Eyes-Only


Joined: 10 Aug 2006
Posts: 1046
Location: La Confederation Abenaquaise

PostPosted: Wed 20 Feb 2008, 16:26    Post subject:  

My guess off the top of my head Flash would be like "DejaVu Sans" or maybe even "Sans"?

"Charset" usually means "font", eh? Hence my guesstimate.

HTH?

Eyes-Only
"L'Peau-Rouge"

_________________
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. Cool
*~*~*~*~*~*
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Sat 23 Feb 2008, 13:53    Post subject:  

Flash,

Suppose we want an active HTML page of our music directories.

For purpose of illustration, I'll presume our music directories are located under /music (which they probably aren't and you'll have to make adjustments)

# cd /music
# tree -d -H /music > /root/music.html

Using your browser, open /root/music.html. Bookmark it. Thereafter, you can open music.html and click on a directory, the directory will open showing the files within the directory, even though they are not visible in the document music.html.

Clicking on a file will open (or give option to open) that file with the browser's default music player.

Bruce
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Sat 23 Feb 2008, 16:25    Post subject:  

Bruce B wrote:
Flash,

Suppose we want an active HTML page of our music directories.

We do, we do! Smile

Quote:
For purpose of illustration, I'll presume our music directories are located under /music (which they probably aren't and you'll have to make adjustments)

# cd /music
# tree -d -H /music > /root/music.html

Using your browser, open /root/music.html. Bookmark it. Thereafter, you can open music.html and click on a directory, the directory will open showing the files within the directory, even though they are not visible in the document music.html.

Clicking on a file will open (or give option to open) that file with the browser's default music player.

Bruce

Thanks, Bruce. I can't wait to try it. Smile (Maybe this weekend I'll find the time.)
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Wed 11 Nov 2009, 23:54    Post subject:  

Sorry Bruce, your way turned out to be a bit more complex than I needed at the moment. Here's what I did that worked:
Code:
# tree -d -o /tmp/tree_test --charset Fixed --noreport
    -d makes tree show only the directories, no files.
    -o /tmp/tree_test makes tree put the result in a file named tree_test in /tmp
    -charset Fixed makes tree use the font named Fixed. Turns out that tree will only use fixed spacing fonts, and Puppy only has two: Courier and Fixed. I like Fixed best.
    -noreport makes tree leave off the report at the end which shows the number of directories it found.

I opened the resulting file ( tree_test, in /tmp) in Geany (I tried Abiword but it was way too slow. I guess the file was too big.) and edited it the way I wanted, saved it, then used Menu --> Document --> Puppy PDF to convert it to a pdf file so I could print it.

[Edit: if the commands I used won't work for you, it's probably because the version of Puppy you're using doesn't have the Fixed charset. Just delete " --charset Fixed" from the line.]
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Mon 16 Aug 2010, 00:25    Post subject:  

Attempt to use Tree (from the first post in this thread) in Quirky 1.0 gives this error message:
Code:
# tree -d -o /tmp/tree_test --charset Fixed --noreport
tree: Invalid argument -`'.
usage: tree [-adfgilnpqrstuxACDFNS] [-H baseHREF] [-T title ] [-L level [-R]]
#

I opened a xterm window in the directory by hitting the ` key while in the directory. Thinking that was the problem, I opened a xterm window by right-clicking in the directory and choosing Window, then Terminal here. Either way gave the same result.

Edit: Pizzasgood's Tree 1.5.2.2 .pet works in Quirky 1.3
Back to top
View user's profile Send private message 
cthisbear

Joined: 29 Jan 2006
Posts: 3385
Location: Sydney Australia

PostPosted: Tue 17 May 2011, 04:31    Post subject:  

I used ZTreeWin for years...Windows.

I don't know if it runs in wine.

http://www.ztree.com/html/ztreewin.htm

My knowledge of computers started by using XTreeGold
and Quikmenu.

http://www.download-central.ws/DOS/Apps/Q/QuikMenu/

Mary Hopkins moment there.

http://www.youtube.com/watch?v=MDVhB0jGP7I&feature=related

Chris.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0735s ][ Queries: 13 (0.0037s) ][ GZIP on ]