Odd problem with terminal
Johnneylee Rollins
johnneylee.rollins at gmail.com
Sun Sep 5 09:06:04 UTC 2010
On Sat, Sep 4, 2010 at 2:12 PM, Karl Larsen <klarsen1 at gmail.com> wrote:
> On 09/04/2010 02:50 PM, 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.
>>
>>
> I tried your idea without the sudo. Here is what it did:
> karl at Lucid:~$ cd /media
> karl at Lucid:/media$ ls
> 4083-B092
> karl at Lucid:/media$ rm -rf 4083-B092/*
> karl at Lucid:/media$ ls
> 4083-B092
> karl at Lucid:/media$ rm -rf 4083-B092/*
> karl at Lucid:/media$ ls
> 4083-B092
> karl at Lucid:/media$
> karl at Lucid:/media$ ls
> 4083-B092
> karl at Lucid:/media$ sudo rm -rf 4083-B092/*
> [sudo] password for karl:
> karl at Lucid:/media$ ls
> 4083-B092
> karl at Lucid:/media$
>
> So neither work for reasons unknown, I will now try to format
> the stick as ext4 and see what happens.
>
Where's that quote about Ubuntu-users when you need it? :(
~SpaceGhost
More information about the ubuntu-users
mailing list