Forum > Linux

List drives on linux

(1/1)

wotanica:
Does anyone have a function to list the drives (mounted volumes) on a linux system?
In windows you can use the "GetLogicalDriveStrings()" API function, and on the Mac you can use normal pascal to list the drives in /Volumes.

Is it as simple as using findfirst/next/close on the /mnt folder?

theo:
Have a look at /etc/mtab
for ex:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Memo1.Lines.LoadFromFile('/etc/mtab');              

wotanica:

--- Quote from: theo on October 01, 2010, 10:49:09 pm ---Have a look at /etc/mtab
for ex:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Memo1.Lines.LoadFromFile('/etc/mtab');              
--- End quote ---

Thanx! Will check it out!

mica:
cat /proc/partitions

or as root

fdisk -l
 
or parted -l

Navigation

[0] Message Index

Go to full version