How To Eject a Volume from the Terminal Command Line in MacOSX

Author: , December 8th, 2015

As always, YMMV… 1 2 3 4 5 6 7 8 9 #!/bin/bash # Usage: eject [fullpath to mount point] DISK="${1:-/Volumes/YourUSBFlashDriveName/}" df -h "$DISK" > /dev/null 2>&1 if [ $? -eq 0 ]; then    diskutil unmountDIsk `diskutil list "$DISK" | grep ^/dev/` else    echo Volume $DISK is not mounted…skipping. fi #!/bin/bash # Usage: […]

How To Create An XFS Formatted Filesystem On AWS EC2

Author: , October 26th, 2011

First, use the AWS management console to create and attach a new volume. Note the device name, in our example /dev/sdf. 1 2 3 4 5 6 7 # yum install xfsprogs-devel # mkfs.xfs /dev/sdf # echo "/dev/sdf /data xfs noatime 0 0" | tee -a /etc/fstab # mkdir -m 000 /data # mount /data […]