Check for mounted volume via terminal?

I want to write a simple bash script that will unmount a volume if it's already mounted. How do i check to see if the volume is mounted?

if [/Volumes/Backup is mounted ]
umount /Volumes/Backup
fi

PowerMac G5 (10.5.8) / MBP 15" / MBP 17" / Mini, Mac OS X (10.6.2)

Posted on Apr 7, 2010 12:28 PM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Check for mounted volume via terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.