can't remove a file from a USB drive

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

can't remove a file from a USB drive

Postby heiowge » Thu Jul 12, 2012 7:48 pm

I've got a USB stick with a couple of files on it I need gone. After dolphin failed, I tried CLI. As root, I was unable to remove them.


rm: cannot remove `torch 23.JPG': Read-only file system

Any help?
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby heiowge » Thu Jul 12, 2012 7:57 pm

Ok, the files are gone. I unmounted and remounted the stick and I could suddenly do it!:oops:

I still want an answer to the question though... how do I change the permissions so I can delete read only files in the future (without pulling the stick)?

I've been trying to wrap my head around chown and chmod, thinking they were the sort of things I should be looking at, but Gaaarrrgghh!!! They talk all "man pages" at me. :roll:
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby Rhakios » Thu Jul 12, 2012 8:06 pm

Sometimes it's as simple as going to the file's properties in your preferred file manager and ticking the Write box. However, as your error seems to indicate a read only file system, I assume the stick itself hadn't mounted properly, that's a bit odd, presumably after you pulled it and reinserted it, it remounted rw, as one would expect.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby heiowge » Thu Jul 12, 2012 8:15 pm

Something like that. I did reach from my little CLI book, but it's not there. I think it's in the loft and I left the Fedora based Linux guide down here instead. The book isn't in plain English. It's like "Man pages - the full volume!" :lol:
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby Rhakios » Thu Jul 12, 2012 9:48 pm

I have "Linux Command: Instant Reference" which is a bit like that, but it's one short reach from my desk. And much better than "Linux Complete", which is basically just all of man from a particular era in print.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Ram » Thu Jul 12, 2012 10:11 pm


lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby wyliecoyoteuk » Fri Jul 13, 2012 11:38 am

If it was saying "read only file system", then it was mounted as read only, i.e. like CD.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3457
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby nelz » Tue Jul 17, 2012 11:19 pm

It said read-only filesystem, not read-only file, so chmod won't help. In fact it won't do anything because the filesystem is read-only. This is not unusual with USB sticks and is usually caused by a filesystem error causing the kernel to mount the stick read-only to prevent damage. Unmounting and remounting the stick generally works, unless the filesystem is already damaged.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8501
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby JimCameron » Tue Sep 11, 2012 10:11 am

Long Path Tool helped me in this situation. http://DeleteLongFile.com
JimCameron
 
Posts: 1
Joined: Tue Sep 11, 2012 10:03 am

Postby heiowge » Tue Sep 11, 2012 11:02 am

You are aware this is a LINUX forum? :roll:
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby Ram » Tue Sep 11, 2012 11:57 am

heiowge wrote:You are aware this is a LINUX forum? :roll:


This made me laugh

No special system requirements. LONG PATH Tool works on any Windows version (NT/2000/XP/Vista/Windows 7).

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Rhakios » Tue Sep 11, 2012 7:42 pm

Ram wrote:
heiowge wrote:You are aware this is a LINUX forum? :roll:


This made me laugh

No special system requirements. LONG PATH Tool works on any Windows version (NT/2000/XP/Vista/Windows 7).


Or indeed, knife, fork and plate. :)
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Nelson32 » Sat Oct 06, 2012 2:43 pm

Long Path Tool helped me in this situation, but don't listen to a stupid spammer like me.
Nelson32
 

Postby Ram » Sat Oct 06, 2012 4:39 pm

Think you should lock this thread, might stop the stupid idiots posting.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby nelz » Sat Oct 06, 2012 4:42 pm

I'd rather delete the idiots than prevent genuine users being able to use the thread.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8501
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Next

Return to Help!

Who is online

Users browsing this forum: Google [Bot] and 1 guest