How to delete a backup of /dev/fd?
For extra safety, I recently decided to make a second backup of my Macbook's HD. Initially I did so with rsync, because I was already using Time Machine for my first backup. But then I realized Time Machine can handle backups to multiple disks and decided to use Time Machine for the second backup as well.
However, when I try to delete the rsync backup in Finder, I get the following error message:
The operation can't be completed because the item "fd" is in use.
A little investigation confirms that it is failing on the backup's /dev/fd folder. I understand that this folder contains file descriptors (although I'm hazy on what exactly that means). I think perhaps what may have happened is that the file descriptors in use at the time of the backup were copied over, and these are somehow marked as in use. In any case, I'm wondering if anyone knows how I can safely delete these items?
(FWIW, I tried closing all open applications before trying the delete, which made no difference.)
If this is an external drive, you can just clean it up from another host.
/dev/fd contains the file descriptors for the current running process, so they're kind of special - you may need to drop down to single-user mode (command-s at boot chime), or plug the device into another host to remove this.
You could also try mounting the volume 'nodev' (umount $BACKUP_VOLUME; mount -o nodev $BACKUP_VOLUME $BACKUP_MOUNTPOINT
) and just cleaning it up that way.
In the end, I just ran sudo rm -rf
. I suppose I should have tried that earlier but I am skittish about that command!