lsof is indeed your best bet. The fastest and easiest way would be this :-
sudo lsof /Volumes/myDrive
It can take a couple minutes to run, but once it's complete, it gives you a list of open files on the disk. The output will look something like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mds 89 root 19r DIR 52,3 ...
Open up the Terminal and enter the command:
diskutil cs list
Or with APFS starting with 10.13
diskutil apfs list
With APFS the FileVault setup utility also shows health and this status:
You will see an output listing at least one Logical Volume Group, with a Logical Volume Family and Logical Volume nested below.
There is be a ...
I needed to format a partition to ext3 on my USB flash drive. The drive was already formatted, and had 3 partitions, and I wanted to convert partition 1 from FAT32 to ext3.
install brew, visit http://brew.sh/
install e2fsprogs using brew install e2fsprogs
figure out the name of your partition or drive using diskutil list -- in my case, my partition had was ...
You can create an Automator service or application to facilitate executing the rm shell commando, which will permanently delete files or folders and skip the trash.
For example, start with creating a new Service in Automator.app.
Select files or folders as input, you probably also want to limit the availability of this service to the Finder app.
You can use the dd command to make a bit-perfect clone of a drive. It's a command line tool that ships with OS X. In order to make the clone perfect you'll need to ensure the source and the destination aren't actively in use.
To prepare for the clone I recommend creating a secondary boot disk that you can boot from. Your source for the clone should be an ...
SOLVED. Had this problem today. OLD external drive, had its own power source, plugged into a surge protector. I hit the power button on the surge protector when I was unplugging something else, and the drive was turned off while in use. I turned it back on and it sounded normal, but my computer wasn't recognizing it, and Disk Utility wouldn't load when it ...
Have you tried $ diskutil unmount /Volumes/Diskname ?
Or $ diskutil unmount force /Volumes/Diskname ?
As the manpage points out:
Due to the complex and interwoven nature of Mac OS X, umount may fail often. It is recommended that
diskutil(1) (as in, "diskutil unmount /mnt") be used instead.
If your volume has spaces in the name, be sure to ...
Simply turn indexing off for the drive and erase the contents of the journal on the volume. To do so, open Terminal and enter the following command:
sudo mdutil -Ei off "/Volumes/Name_of_Drive"
You must run this procedure as an admin. Enter your password when prompted. A reboot may be required.
Alternatively, as suggested by Simon White, just shut down ...
Time Machine supports APFS as a source and not a destination. You can't backup to an APFS destination disk and Time Machine will inform you that the disk needs to be HFS+ if you attempt to do this.
Right now, there's nothing you need to or should do. Your internal disk has been converted to APFS and your backup disk is still on HFS+, so Time Machine will ...
You don’t need to remove the HDD and no need for second Mac.
Boot the MacBook Pro from the USB stick (that you made with OS X El Capitan 10.11)
Using Disk Utilities in the Tools menu, you can reformat the hard drive as part of the installation process.
To boot using the USB, restart your MacBook and press and hold the Option key and Select the USB drive ...
Taking aside the part that says which OS a particular filesystem is associated with, the main point is the word "journaled".
I include the following Wikipedia quote as there is no point re-inventing the wheel:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
FAT32 (called MS-DOS (FAT) by Disk Utility; a filesystem originally released in 1977 and updated a few times since, lastly in 1996) really is the only cross platform filesystem that is going to work fully out of the box with Windows and Mac OS X.
Be careful though, if you are using Disk Utility to format the drive, you should make sure to choose the Master ...
This is a common issue which happens when the file's type and creator attributes are modified by Finder when its writing files, if these attributes aren't restored back to the original values by Finder at the end of its write action, those files won't be accessible to the user.
Running this command will remove the creator and type attributes set by Finder,
You may try to unmount it from the command line:
diskutil unmount /Volumes/MountPoint
or with force:
diskutil unmount force /Volumes/MountPoint
If it's still failing, check what's using your disk:
sudo fs_usage -w -f filesys | grep Volumes
Or using lsof:
sudo lsof | grep Volumes
(Some processes only turn up when lsof is run as administrator.)
I'd recommend checking if fsck is holding your disk hostage upon connection. This was it for me.
Running ps aux | grep fsck revealed:
root 2587 7.3 0.1 4363584 21780 ?? U 10:56PM 2:22.54 /System/Library/Filesystems/exfat.fs/Contents/Resources/./fsck_exfat -y /dev/rdisk2s1
So the solution was a sudo kill -9 2587 (insert your PID ...
On OS X 10.11.1 the output diskutil cs list shows encryption progress as:
+-- Logical Volume Group 19B060CE-52A6-4102-9F3D-E6108BD91316
Name: My harddrive
Size: 499113885696 B (499.1 GB)
Free Space: 18972672 B (19.0 MB)
And option could be Terminal command rm, with the -P option if you want some added security:
[Option -P will]
Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.
To do so, just:
Open the Terminal.app (Found in /Applications/...
There is a chance to repair it with command line (in Terminal) with the terminal utility as described in Apple's support docs, shown below:
Use the command line and the fsck_hfs -l command.
Start up your computer and log in as an administrator.
Open Terminal (/Applications/Utilities).
At the prompt, type the following command and then press ...
It's probably no different hardware-wise, just already formatted for the Mac. There's a whole pile of people who still think Macs need special everything, so the companies take advantage of that to fleece them out of an extra £20.
In general, you don't need special Mac-only hardware stuff anymore. Hard drives, RAM, peripherals, etc. are all fairly ...
⌘ Command⌥ Option⌫ Delete will permanently delete files, with a confirmation dialog warning that this action can not be undone. ⌘Command⌫ Delete simply moves files to Trash, without confirmation.
Tip: whenever you want Mac app to do the same action but a little differently, try doing it with ⌥ Option button pressed.
You can store and run applications in the non-standard /Application location on OS X, which means you can keep things on your external drive and run them from there.
You just have to be aware of the limitations of doing it this way:
The applications and data on the drive won't be available when it's not connected.Seems obvious but this can come up in ...
Apple's bespoke command line utility to do disk cloning is asr.
It is tailored to the specifics of OS X needs to perform file by file as well as block based imaging and deals with differences in partition sizes, allows network streaming (and even multicast streaming) as well as copying between disks that are locally connected. Unlike dd, it knows about ...
i like to do it this way.
while true; do diskutil cs list | grep 'Conversion Progress' ; sleep 30; done
will print out an updated progress every 30 seconds so you can just leave it running and glance over and instantly see where the progress is up to without having to run the command again.
You could have a script that runs at startup that employs the technique suggested in this post https://apple.stackexchange.com/a/91759/183505
When booting from DriveA (when you want to disable spotlight indexing for External DriveB) you could execute :
When booting from external DriveB and you want to re-enable ...
Using exFAT would be a good idea if the Windows computer runs Vista or Windows 7. This is a “simple“ filesystem yet it supports > 4 Gb files and multi-terabyte partitions.
For compatibility with 32 bits filesystems you still have to use MBR, not GPT.
I would try using rsync from the command line.
rsync -av --ignore-errors /Volumes/failingDrive/ /Volumes/brandNewDrive
should do the trick. Mind the trailing / at the end of the source. Rsync will not copy files it finds on the destination, so if you call it a second time it will continue where it left off.