Odd problem with terminal

Robert P. J. Day rpjday at crashcourse.ca
Sat Sep 4 20:59:06 UTC 2010


On Sat, 4 Sep 2010, Steven Susbauer wrote:

> On 9/4/2010 3:05 PM, Karl Larsen wrote:
> >
> >       I have several USB memory sticks with some just junk on them. I use
> > the proper bash calls to remove the junk but get this error message
> > every time:
> >
> > karl at Lucid:/media$ ls
> > 4083-B092
> > karl at Lucid:/media$ sudo rm -Rf 4083-B092/
> > rm: cannot remove directory `4083-B092': Device or resource busy
> > karl at Lucid:/media$
> >
> > I can't find out what the Device or resource busy error is, or where it
> > is coming from. I also have a hard drive which plugs into a USB port and
> > it too gives the same error message.
> >
> > What can I be doing wrong?
>
> Assuming you are trying to remove all files from the USB stick, you
> need to tell it to remove the files on the stick rather than
> removing the stick itself (what you are doing at the moment is
> similar to attempting to drag C: to the trash on a Windows system).
> 4083-B092 is the mount point, not just a directory.
>
> The proper way to delete all files on the stick would be
>
>   sudo rm -rf 4083-B092/*
>
> Of course, you could always just reformat the stick as well.

  well, great.  now *everybody* knows.  :-)

rday

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Top-notch, inexpensive online Linux/OSS/kernel courses
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the ubuntu-users mailing list