Can’t eject cdrom? Try fuser

ript>

Just a quick note to myself (and anyone else who might be in a similar situation)…

Sometimes, after I’ve played some video file written on a cd-rom, I can’t eject it because the file is locked/used by another application/daemon (like dbus-launch or dbus-daemon).

The quicker way I’ve found to unlock/free the file (and eject the disc) is to use “fuser -k” with the full path specification of the file as an argument, like this:

fuser -k /cdrom/file.avi

If, on the other hand, you just want to see which processes are using a certain file, try these commands from any terminal:

fuser -v /var/spool/mail/$LOGNAME
lsof /var/spool/mail/$LOGNAME


Visit The Light of the LAMP blog for more…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.