How can I tell if a directory is a mount point?

How can I tell if a directory is a mount point?
Answer
Using
the mount Command
One way we can determine if a directory is mounted is by running the mount command and filtering the output. The above line will exit with 0 (success) if /mnt/backup is a mount point. Otherwise, it’ll return -1 (error).
 

Tìm kiếm

Back
Top