maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Delete read only directories in x terminal (https://talk.maemo.org/showthread.php?t=51463)

andraeseus1 2010-04-30 06:54

Delete read only directories in x terminal
 
oK, so here is the prob

I was backing up my dad's memory card from his black berry bold to my n900 internal storage memory. the phone was taking for ever to do it and i wasn't sure if it was frozen or not so i interrupted it and powered off the phone during the transfer. ( i know that wasn't smart)

so it seems that this some how corrupted my internal memory because now i am unable to delete the folder "Dad backup" from my internal memory. some of the files were copied to it but not all as i interrupted. what can i do? the error msg is "can not delete folder is read only"

So i go to x terminal and google and research through like a gazillion chmod, and rmdir, and rm -rf command i can find and still having trouble with this.

can some one please help me get this crap off my phone with out lossing all of my precious media files. I just want this nagging folder out of my internal storage

andraeseus1 2010-04-30 06:55

Re: Delete read only directories in x terminal
 
btw i am very new to linux and x terminal so pls be abc with me

zod 2010-04-30 07:09

Re: Delete read only directories in x terminal
 
Install rootsh package. become root user by typing 'sudo gainroot' and try then.

andraeseus1 2010-04-30 07:22

Re: Delete read only directories in x terminal
 
already root already. still cant delete the file i am using rm -rf home/user/MyDocs/Dad\ backup

Marcus 2010-04-30 07:30

Re: Delete read only directories in x terminal
 
You have to delete all the files in the folder first I believe. (I don't remember the -rf though)
Also, try to put / infront of home.
/home/user/MyDocs/Dad\ backup

Incase you have to remove files, do:
rm /home/user/MyDocs/Dad\ backup/*

EDIT: And to delete the directory at last, do
rmdir /home/user/MyDocs/Dad\ backup

Joorin 2010-04-30 07:42

Re: Delete read only directories in x terminal
 
Quote:

Originally Posted by andraeseus1 (Post 634578)
already root already. still cant delete the file i am using rm -rf home/user/MyDocs/Dad\ backup

It's always helpful to supply as much information as possible. So, use the command "ls -l" on the directory that just won't go away and paste the result here.

When it comes to the rm command, -r means "recursive" and -f means "force" (as in, don't ask me about anything, just do it). If you actually are root (which is something else than to stand in the root directory, and still can't remove things with rm -rf it surely looks weird.

I have no idea why people use "sudo gainroot", just typing "root" with rootsh installed works, in my opinion, better.

Marcus 2010-04-30 07:43

Re: Delete read only directories in x terminal
 
Joorin:
I am using "sudo gainroot", but only because that I've never heard you could use anything else. Thanks!

andraeseus1 2010-04-30 07:51

Re: Delete read only directories in x terminal
 
Quote:

Originally Posted by Marcus (Post 634582)
You have to delete all the files in the folder first I believe. (I don't remember the -rf though)
Also, try to put / infront of home.
/home/user/MyDocs/Dad\ backup

Incase you have to remove files, do:
rm /home/user/MyDocs/Dad\ backup/*

EDIT: And to delete the directory at last, do
rmdir /home/user/MyDocs/Dad\ backup


so i go deeper and deepr into the /Dad\ backup directory untill i reach a folder named Babies. but when i try and do anything with the folder Babies it says "Imput/output error.

it wont allow me to cd to it or rmdir i. it just keeps spitting out that error. i tried to ls that directory but it wont allow that either.

there are a few folders like this in the /home/user/MyDocs/Dad\ backup/BlackBerry/pictures file path. i supposed these are the currupt fiels that make the whole Dad back up folder read only any other ideas?

BlackDiamond 2010-04-30 07:51

Re: Delete read only directories in x terminal
 
I use both, depending on the situation.
"sudo gainroot" leave you in the same directory when "root" put you in 'root' home directory

michaaa62 2010-04-30 07:56

Re: Delete read only directories in x terminal
 
Did you try to access the internal memory card from your pc via USB, not ssh, and delete the files or directories while not under the control of your maemo5 system?


All times are GMT. The time now is 16:01.

vBulletin® Version 3.8.8