I have a data collection system that collects data to hot swappable disks. Is there a way I can determine the type of media a file will be written to? Let me explain: I have a diskless boot system. The Linux OS and all come from over the network. So, unless I mount a disk, anything written anywhere will be to RAM. If I mount a disk, the file will be written to the disk and not RAM. How can I determine that it is a disk and not RAM? The disks are mounted via udev. The mount point exists as a directory whether there is a disk mounted over it or not, so I cannot use that to see. I want to know if there is a disk mounted where I am writing, or somewhere above it. As I read this question I too think it sounds odd. But I really would like to know. Maybe statvfs()? If the size of the media is greater than some test limit, (RAM in the machine perhaps) then it must be some mounted thing? Is there a better way? -- Roger Oberholtzer OPQ Systems AB Ramböll Sverige AB Kapellgränd 7 P.O. Box 4205 SE-102 65 Stockholm, Sweden Tel: Int +46 8-615 60 20 Fax: Int +46 8-31 42 23