Recent

Author Topic: List drives on linux  (Read 21543 times)

wotanica

  • Guest
List drives on linux
« on: October 01, 2010, 10:31:51 pm »
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?
« Last Edit: October 01, 2010, 10:44:52 pm by wotanica »

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: List drives on linux
« Reply #1 on: October 01, 2010, 10:49:09 pm »
Have a look at /etc/mtab
for ex:
Code: Pascal  [Select][+][-]
  1. Memo1.Lines.LoadFromFile('/etc/mtab');              

wotanica

  • Guest
Re: List drives on linux
« Reply #2 on: October 02, 2010, 12:14:30 am »
Have a look at /etc/mtab
for ex:
Code: Pascal  [Select][+][-]
  1. Memo1.Lines.LoadFromFile('/etc/mtab');              

Thanx! Will check it out!

mica

  • Full Member
  • ***
  • Posts: 196
Re: List drives on linux
« Reply #3 on: October 02, 2010, 10:41:22 am »
cat /proc/partitions

or as root

fdisk -l
 
or parted -l

 

TinyPortal © 2005-2018