News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
Listing availiable storage devices
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Listing availiable storage devices

Another Linux option is to check /etc/mtab, which is a list of all currently mounted filesystems.

for line in io.lines("/etc/mtab") do
if string.find(line,"^/dev/") then
  dev,_=string.gsub(line,"%s.*","") -- cut off everything after field 1

or a more compact version that does similar...

for line in io.lines("/etc/mtab") do

This post was last modified: 12-28-2010 10:25 AM by mikshaw.

12-28-2010 10:16 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Listing availiable storage devices - dvw86 - 12-27-2010, 05:59 AM
RE: Listing availiable storage devices - mikshaw - 12-28-2010 10:16 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: