As part of a larger project, I'm currently writing a python script that runs Linux commands in a vApp.
I'm currently facing an issue where after working with a mounted iso, it may or may not unmount as expected.
To check the mount status, I want to run the df -hk /directory
and du -sch /directory
commands respectively, and compare the outputs.
If the iso is not unmounted, the result for the df command should return a larger value than the du command as the df command includes the mount size in the result, while du does not.
I'm just wondering how can i compare these values or if there is a better way for me to run this check in the first place.