Tree print [Solved]

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Post Reply
Snowman
Simple Hen
Posts: 96
Joined: Thu Jan 18, 2007 13:37
Location: Florida, USA

Tree print [Solved]

Post by Snowman » Tue Nov 20, 2007 16:48

How can I get a print out (or better a txt file) with a listing of all directories (and potentially files) for a specific folder?
The tree command does not work and I'm at a loss to find any info on this in the Sabayon Wiki.
Thanks
Registered Linux User 416248

spaarketel
Baby Hen
Posts: 10
Joined: Thu May 31, 2007 12:51

Re: Tree print

Post by spaarketel » Tue Nov 20, 2007 17:17

I'd say

Code: Select all

ls -RF /folder/you/want/to/print > outputfile.txt
Cheers,

Simon
Last edited by spaarketel on Tue Nov 20, 2007 17:21, edited 1 time in total.

gaffu
Growing Hen
Posts: 110
Joined: Tue Jan 23, 2007 16:16

Re: Tree print

Post by gaffu » Tue Nov 20, 2007 17:18

Code: Select all

ls > yourtextfile.txt
or, if you want also the files in the subdirectories:

Code: Select all

ls * > yourtextfile.txt
Edit: spaarketel as a better implementation than mine for subdirectories...

Snowman
Simple Hen
Posts: 96
Joined: Thu Jan 18, 2007 13:37
Location: Florida, USA

Re: Tree print

Post by Snowman » Fri Nov 23, 2007 16:12

Thanks. Don't know I hadn't thought of it.
Registered Linux User 416248

Post Reply