[Wolves] defrag

Mo Awkati mawkati at yahoo.co.uk
Sun Dec 21 08:23:53 GMT 2003


Hi Peter
 
I'll have a go with your approach as well. I presume fuser is an application?? 
 
All the LUG contributions are helping me get to grips with the command line work. I have got hold of O'Reilly's Linux in a Nutshell so I am hoping with your help I can get to speed with things. :-)
 
Mo

Peter Oliver <p.d.oliver at mavit.freeserve.co.uk> wrote:
On Sat, 20 Dec 2003, David Goodwin wrote:

> > There is more choice from what you say but I am not familiar with the
> > terms yet except ext2 which I know now because I just had a go at
> > formating a floppy using KDE (using the live cd). How do I "KILL" a still
> > busy floppy? because after I completed the formatting the floppy drive
> > just stayed busy and everytime I tried to access it I got not accessible
> > or error messages. I know I need to use the 'kill' command but I am not
> > sure how, does this sound right
> 
> Try something like :
> 
> lsof | grep floppy
> 
> or
> 
> lsof | grep fd0
> 
> that should list any processes accessing the floppy disk. From the pid
> given you can then attempt to kill them. (man lsof may give more help than
> me).
> 
> Firstly try a normal "kill" e.g.
> 
> kill 543
> 
> if that fails to kill it off after a few seconds, try a
> 
> kill -9 543
> 
> (543 == pid)
> 
> if that doesn't work then something is blocking it.... and the only way to
> stop it is probably a reboot, if you can't figure out what's going on.

Assuming that David knows KDE better than me and has correctly diagnosed
your problem, you can roll this all up into one command with fuser. If
your floppy is mounted on /mnt/floppy,

fuser -m /mnt/floppy -k -TERM # ask nicely for programs to exit
fuser -m /mnt/floppy -k -KILL # make programs die messily

-- 
Peter Oliver

_______________________________________________
Wolves LUG mailing list
Homepage: http://www.wolveslug.org.uk/
Mailing list: Wolves at mailman.lug.org.uk
Mailing list home: http://mailman.lug.org.uk/mailman/listinfo/wolves

---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/wolves/attachments/20031221/d8816524/attachment.html


More information about the Wolves mailing list