diskspace

Find size and free space of the filesystem containing a given file

Find size and free space of the filesystem containing a given file Question: I’m using Python 2.6 on Linux. What is the fastest way: to determine which partition contains a given directory or file? For example, suppose that /dev/sda2 is mounted on /home, and /dev/mapper/foo is mounted on /home/foo. From the string “/home/foo/bar/baz” I would …

Total answers: 12