-   Linux - Newbie (
-   -   Command to display whole filestructure hierarchy f/ command line? (

mjewell 01-17-2004 03:48 PM

Command to display whole filestructure hierarchy f/ command line?
I'm weaning myself as rapidly as possible from a graphic user interface to learn my Linux commands.

Its hard though b/c I started computers with a MacIntosh in or around 1984 and did not shift to a PC until after (gad!) Windows 95.

Is there a way to display the entire filesystem hierarchy from the command line?

Something analogous to the filesystem tree in a GUI? I keep getting disoriented, and I have not memorized the basic Linux filesystem yet except that root is at the top, and a few of the important files /proc /dev /bin, etc. are next.

I already know how to list the contents of a particular directory, but I'd really like to be able to get a bird's eye view of the whole tamale once in awhile.

/// Thanks in advance. This forum has really helped me a lot so far, and I appreciate the patience and insight of my fellow members who have guided me thus far. Regards from just below the Great White North --- yes, Montana.

MartinN 01-17-2004 04:25 PM

Hi mjewell!

Maybe Midnight Commander is what you want? Try typing mc at the command line.

Regards from the Great White North - Sweden :D

mjewell 01-17-2004 04:37 PM

Thanks, MartinN! I've heard of Midnight Commander before but never understood what it was for. ::o I'll try it out.

How's the weather over there? We just recovered from a bout of -20 degree holiday cheer. Gad! rolleyes: I REFUSE to shovel the driveway until the snow stops for a decent interval.


MartinN 01-17-2004 05:25 PM

Good to hear that you liked Midnight Commander.

I just checked the thermometer, it's -6 Celsius (21 F). We have some snow, but a couple of days ago the temperature was above 0 C, so it's very icy. Showel the driveway? That's another reason for living in an apartment. :D


mjewell 01-17-2004 05:42 PM

Oops! Sorry --- yes, we were just about b/t -28 and -30 degrees Celsius. And we're having the slippery refrozen ice cream effect on the roads too. Wish I was in an apartment!

At least the days are getting longer again.

Thymox 01-17-2004 07:58 PM

If you want, you could just type (as root) ls -R /. This will scroll by pretty quickly, so you may want to either redirect the output to a file or pipe it to more/less:
ls -R /
ls -R / > /home/mjewell/file-system.txt
ls -R | less

Hope this helps.

Oh, and if you want filesizes too, then use ls -lR / instead.

mjewell 01-17-2004 09:29 PM

That's another great one. It makes total sense from what I've read and struggled to understand and apply. Hearing you say gave me one of those ah-hah! moments. Thanks!!!

mjewell 01-17-2004 09:31 PM

Oops! One follow up. How do I redirect output to a file that I can print out and read as text?

Thymox 01-18-2004 06:10 PM

Use the >

eg. command > filename.txt

jschiwal 01-19-2004 01:24 AM

There is a command called tree, however it may not be installed by default.
it displays the directories and files in a tree like structure.

By the way, I was just outside. It is -24 degress Celcius, but feels much colder tonight.

mjewell 01-19-2004 11:48 AM

Thanks, Jschiwal --- I should have started posting my questions much sooner b/c the responses have been so helpful. Tree sounds great. I'll reboot into my Linux partition and see if its there.

Its nice to get a message from a fellow freezing person. North Dakota is king of cold. Western Montana is just a distant cousin of cold by comparison. :)

We're up to something like -12 Celsius today, but the roads are still covered with snow that's been melted and refrozen a couple of times. I'm still boycotting the snow shoveling and the pizza delivery guys are starting to give me dirty looks.

All times are GMT -5. The time now is 08:58 AM.