• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux: check if filesystem is mounted

ufs

Senior member
I am writing a script to execute a program if a certain filesystem is mounted. How do I check that? I couldn't find an appropriate command to achieve that. Any help will be highly appreciated. I am working in RedHat Enterprise Linux 4. Thanks.
 
The 'mount' command will output all of the mounted filesystems. Or you can look at /proc/mounts directly. Or if you know of a certain file/directory that will always exist on that mounted filesystem but not otherwise you could check for it's existance before running your script.
 
Back
Top