Fix a "Files/Disk in use" issue

When trying to eject a disk if a file or folder is in use, the user is given the following generic warning:
 
The disk ... can't be ejected because one or more programs may be using it
 
The problem is that it doesn't specify what program is using the disk image. The user has to guess, and sometimes quit everything in order to eject disk. Force eject is an option, but there is the risk of disk damage.
 
Solution:
The work-around is to open Terminal and run the command lsof | grep Volumes
 
The command "lsof" simply lists open files. The vertical bar "pipes" the output of the first command into the second. The command "grep" does a line-by-line search for the desired text "Volumes" and will write the results in the Terminal window.
 
Now simply quit the application that's listed and you'll then be able to eject that volume.
 
 
Similarly re:file usage, if you get the error
 
The operation can’t be completed because the item is in use?
 
...especially when trying to transfer a file to a networked drive, for instance, before trying to remove it from the command line, you might be able to release the file from whatever’s holding it.
 
To see what application is keeping it open Terminal and type
 
lsof | grep ******
 
Obviously replace ****** by the name of the file.
 
If it returns the name of a recognisable application, try closing the app down. I’d do this rather than removing the file immediately since some apps recreate files they can no longer find.
You should be able to remove the file normally from Finder.
 
Another trick is to try to see if relaunching finder works.
 
Finally, if it specifically happens with copying files to Airdrives, the problem is a bug in icon preview. Put the target airdisk into column view in the finder window and it won't happen. Map