Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can't remove a file from a USB drive
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1892
Location: Cheshire, UK

PostPosted: Thu Jul 12, 2012 8:48 pm    Post subject: can't remove a file from a USB drive Reply with quote

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?
_________________
Dead old Dell Dimension 3000 pentium 4 processor 2GB DDR1 RAM 80GB HD. See what I'm reduced to!

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1892
Location: Cheshire, UK

PostPosted: Thu Jul 12, 2012 8:57 pm    Post subject: Reply with quote

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

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. Rolling Eyes
_________________
Dead old Dell Dimension 3000 pentium 4 processor 2GB DDR1 RAM 80GB HD. See what I'm reduced to!

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7604
Location: Midlands, UK

PostPosted: Thu Jul 12, 2012 9:06 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1892
Location: Cheshire, UK

PostPosted: Thu Jul 12, 2012 9:15 pm    Post subject: Reply with quote

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!" Laughing
_________________
Dead old Dell Dimension 3000 pentium 4 processor 2GB DDR1 RAM 80GB HD. See what I'm reduced to!

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7604
Location: Midlands, UK

PostPosted: Thu Jul 12, 2012 10:48 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Thu Jul 12, 2012 11:11 pm    Post subject: Reply with quote

GIYF man chmod
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3422
Location: Birmingham, UK

PostPosted: Fri Jul 13, 2012 12:38 pm    Post subject: Reply with quote

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!

*************** ************
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8367
Location: Warrington, UK

PostPosted: Wed Jul 18, 2012 12:19 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
JimCameron



Joined: Tue Sep 11, 2012 11:03 am
Posts: 1

PostPosted: Tue Sep 11, 2012 11:11 am    Post subject: Reply with quote

Long Path Tool helped me in this situation. http://DeleteLongFile.com
Back to top
View user's profile Send private message
heiowge
LXF regular


Joined: Wed Feb 27, 2008 8:21 pm
Posts: 1892
Location: Cheshire, UK

PostPosted: Tue Sep 11, 2012 12:02 pm    Post subject: Reply with quote

You are aware this is a LINUX forum? Rolling Eyes
_________________
Dead old Dell Dimension 3000 pentium 4 processor 2GB DDR1 RAM 80GB HD. See what I'm reduced to!

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Tue Sep 11, 2012 12:57 pm    Post subject: Reply with quote

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


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.....
Back to top
View user's profile Send private message MSN Messenger
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7604
Location: Midlands, UK

PostPosted: Tue Sep 11, 2012 8:42 pm    Post subject: Reply with quote

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


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. Smile
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
Nelson32
Guest





PostPosted: Sat Oct 06, 2012 3:43 pm    Post subject: Reply with quote

Long Path Tool helped me in this situation, but don't listen to a stupid spammer like me.
Back to top
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Sat Oct 06, 2012 5:39 pm    Post subject: Reply with quote

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.....
Back to top
View user's profile Send private message MSN Messenger
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8367
Location: Warrington, UK

PostPosted: Sat Oct 06, 2012 5:42 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast