LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2011, 07:33 AM   #1
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Rep: Reputation: Disabled
delete corrupted, unknown format files


i am new to linux and need help deleting some files from my memory card,./.
following are the files
-r--r--r-- 1 aagam aagam 3839794457 2017-06-05 20:43 9═?.?c
-rw-r--r-- 1 aagam aagam 3332352151 1905-04-08 22:43 a}vkl.?
-r--r--r-- 1 aagam aagam 2055928732 1957-11-29 19:02 ╙e┼1╬.┬╪
-rw-r--r-- 1 aagam aagam 1295551147 1911-05-23 04:08 ∙eas╤.▄c%
-rw-r--r-- 1 aagam aagam 294471475 2023-10-07 21:37 ,?⌡τ╒.║
-rw-r--r-- 1 aagam aagam 1132727560 2005-04-19 20:18 ??seφl.t?
-rw-r--r-- 1 aagam aagam 2055891474 2003-11-04 05:33 ■╬?╩.╖0─
d????????? ? ? ? ? ? ╡?.?9
-r--r--r-- 1 aagam aagam 1705900635 2017-01-07 03:46 O,cN1╝?╣.i╤
-rw-r--r-- 1 aagam aagam 2086138663 1951-12-12 15:49 ╓a?░t.⌡₧
-rw-r--r-- 1 aagam aagam 1466252760 1982-06-08 20:22 hx╒▓.c?
d????????? ? ? ? ? ? ?⌡c;xi┐.(
-r--r--r-- 1 aagam aagam 2011056987 2030-01-18 04:03 +e+▄.8╖▄
-r--r--r-- 1 aagam aagam 1767543330 1918-09-12 13:58 :╬i└.ΓW
d????????? ? ? ? ? ? i╘pd5.*H
-rw-r--r-- 1 aagam aagam 349033262 2004-01-26 01:56 ?*⌐U.╝
d????????? ? ? ? ? ? ^o?!σσ?.?
Ubuntu is not able to read these file........plz help
 
Old 12-17-2011, 09:25 AM   #2
remmilou
LQ Newbie
 
Registered: Mar 2010
Location: Amsterdam
Distribution: Debian
Posts: 10

Rep: Reputation: 4
The rude and easy way, without really solving the problem:
Backup the files you need, format the card and copy back the saved files...
 
1 members found this post helpful.
Old 12-17-2011, 09:37 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
It looks like the filesystem may be corrupt. You could try either using a graphical file manager, or using tab completion in the terminal. It you use a terminal that supports copy and paste, sometimes copying the filename from the listing, and pasting the name in the terminal after the rm command will delete the file.

What do the permissions on the mount point look like? E.G.: "ls -ld /media/card". If there are filesystem errors, it may have been mounted read-only.

Another method you could use is to list the files, including the inodes. Then use find to locate the file with a strange name and delete it.

Code:
ls -i
485 1цдыла
jschiwal@elite:~/test> find ./ -inum 485
./1цдыла
jschiwal@elite:~/test> find ./ -inum 485 -delete

Last edited by jschiwal; 12-17-2011 at 09:38 AM.
 
2 members found this post helpful.
Old 12-17-2011, 09:41 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
I think these files are not corrupted, the filenames are not shown correctly because proper encoding options was not set when mounting the card (surelly requires utf8 encoding)

edit: Just a thought in reality I don't know
But maybe it is worth trying mount options in order to save some files

Last edited by Cedrik; 12-17-2011 at 09:48 AM.
 
1 members found this post helpful.
Old 12-17-2011, 10:06 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Unless you have a really large card or unless you have been using Linux since Tuesday May the 23rd 1911 I agree this looks like filesystem corruption. What is the file system type? (Depending on the file system type 'fsck' with "-v -n" may return clues or not.) In which OS was it last mounted OK? What was its locale set to? (See 'man locale'.) Was it umounted properly? If you mount it back does it read it OK? And what kind of data was loaded? (What does 'file /mountpointofcard/*' return?)

Last edited by unSpawn; 12-17-2011 at 10:12 AM. Reason: //More -=is=- more
 
1 members found this post helpful.
Old 12-17-2011, 10:57 AM   #6
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Its a read only filesystem....filesystem type is msdos
Actually i got these files from my friend's mobile via bluetooth. Some of these files are installation packages of mobile games....i've tried rm command but since its a read-only filesystem, it doesnt work.When i use LC_CTYPE for one such file it showed that LC cannot change the file . When i used file/mountpointofcard/* i got INPUT/OUTPUT err...i dont wish to format the card as it contains a lot of useful data......
thnx everyone 4 response.

Last edited by Aagam; 12-17-2011 at 10:59 AM.
 
Old 12-17-2011, 11:55 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
First make a backup. Find out the exact mount point of the card ('mount'). Find out which mounted partition has enough free space to hold a copy of the cards contents ('df -mh'). Umount the card then run 'dd if=/dev/card of=/mnt/backup.dd'. Substitute "/dev/card" for the device name the card is located at (find it by running 'fdisk -l' or look in /dev/disk/by-*/ directories or check /var/log/messages) and "/mnt/" for the mounted partition with enough free space. An example (so check you are using the right device and mount point names) may then look like 'dd if=/dev/sdk1 of=/opt/backup.dd'. Once 'dd' finished you can "dry run" fsck on the file system, for example (so check you use the right device name) 'fsck.vfat -lvn /dev/sdk1', to see what it tells us.
 
Old 12-18-2011, 01:12 PM   #8
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
@upspawn
this is the output of dd
dd if=/dev/sdb1 of=/"Movie"/backup.dd
dd: opening `/dev/sdb1': Permission denied

and this is of fsck.vfat
fsck.vfat -lvn /dev/sdb1
dosfsck 3.0.9 (31 Jan 2010)
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
open: Permission denied

both the time its showing permission denied...
 
Old 12-18-2011, 02:33 PM   #9
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
sry.......this time i used those commands againg along with sudo
here is wat i got for fsck.vfat for these files
/Untitled Folder/j:�}�f�$.C�\227
Directory has non-zero size. Fixing it.
/Untitled Folder/j:�}�f�$.C�\227
Start cluster beyond limit (526224332 > 120753). Truncating file.
/Untitled Folder/\2259�\005\000\000\016\200.\012\224C
Start cluster beyond limit (3849617590 > 120753). Truncating file.
/Untitled Folder/\2259�\005\000\000\016\200.\012\224C
File size is 3839794457 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.

these are just a few of those
 
Old 12-18-2011, 08:40 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
No, that doesn't look salvageable to me. How big is this card BTW?
 
Old 12-19-2011, 06:52 AM   #11
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
4 GB
 
Old 12-19-2011, 12:48 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Naw, bit much. I suggest you zero the disk, partition and then reformat the file system.
 
Old 12-19-2011, 05:54 PM   #13
Sed_Awk
Member
 
Registered: Dec 2011
Location: USA
Distribution: Crux 2.7.1
Posts: 41

Rep: Reputation: 0
@ Aagam

You can try recovering all or most files by using photorec

an excerpt of photorec

PhotoRec ignores the filesystem and goes after the underlying data, so it
will still work even if your media's filesystem has been severely damaged
or re-formatted.


Youtube has many videos on it's usage
 
Old 12-20-2011, 08:08 AM   #14
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
i copied the whole content memory card to my system. those unkonwn files couldnt be copied....then i formated the card and copied back the files to it.....so those files are no more...........
THNX EVERYBODY
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't delete corrupted dirs and files flashback Linux - General 6 10-25-2011 12:12 PM
gcov produces unknown function followed by .gcda corrupted file. scrier Programming 6 01-04-2011 02:42 PM
How to delete a line with certain format from files in a directory admod Linux - General 1 09-22-2010 01:07 AM
Root Unable to delete files of unknown type Slowfamily Linux - General 1 06-20-2008 07:10 PM
How to delete a corrupted RPM? pelcito Linux - Software 2 09-10-2004 03:17 AM


All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration