What's the best way to check if two directories belong to the same filesystem?
Acceptable answers: bash, python, C/C++.
|
What's the best way to check if two directories belong to the same filesystem? Acceptable answers: bash, python, C/C++. |
|||||||
|
|
It can be done by comparing device numbers. In a shell script on Linux it can be done with stat:
In python:
or
|
||||
|
|
|
The standard command
|
|||
|
|