HighLife HighLife - 7 months ago 16
Perl Question

Checking Current File System with Perl

I need my perl script to check the file system type of the computer it's running on. What is the easiest way to do this? (on Linux)

Answer

There is a linux command df -T to determine filesystem

You can invoke it from your script and parse the output:

my $filesystem_info = `df -T`;