VectorLinux
September 21, 2014, 09:52:24 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: How To List Whole Folder Structure - SOLVED  (Read 884 times)
Martin109
Vectorite
***
Posts: 289


« on: March 14, 2009, 12:54:47 pm »

How can I get a listing of the whole tree structure of my /hda3 partition, ie all my non-root directories and their interrelations?
« Last Edit: March 15, 2009, 10:41:49 am by Martin109 » Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #1 on: March 14, 2009, 01:49:15 pm »

Something like the following should produce what you want.

tree -d --device / | grep replace-with-correct-device-number

Unfortunately I cannot determine what exactly a "device number" is or how it can be explicitly determined.  I can see that on my system my / partition (hda1) is '770' and my /home partition (hda3) is '773'. So, if I wanted to list just the directory tree structure of my /home partition I would use:

tree -d -device / | grep 773

Or, if I wanted to list just my / partition tree structure I would use:

tree -d -device / | grep 770

The whole thing could be dumped to a text file like this:

tree -d -device / | grep 773 > name-of-file.txt

Hope this helps.  Hopefully someone will shed some light on the "device number" thing.
Logged
Martin109
Vectorite
***
Posts: 289


« Reply #2 on: March 15, 2009, 03:31:03 am »

I can see that on my system my / partition (hda1) is '770' and my /home partition (hda3) is '773'. So, if I wanted to list just the directory tree structure of my /home partition I would use:

Could you say how you can see that your / partition is '770', for example.  What command did you use to find that out?
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #3 on: March 15, 2009, 08:09:38 am »

Running the command without grep will show the different device numbers:
tree -d -device /

If you know your /home is on a different partition then:
tree -d -device /home
should show the device number for that partition.
Logged
Martin109
Vectorite
***
Posts: 289


« Reply #4 on: March 15, 2009, 10:36:53 am »

Thanks, newtor! Smiley
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!