LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Corrupted File Names (https://www.linuxquestions.org/questions/linux-general-1/corrupted-file-names-289535/)

fuzzyspud 02-12-2005 11:49 PM

Corrupted File Names
 
Hi all,

I'm running Slackware 10.0, and I have a large partition called /files which is formatted as JFS. Here is my mtab:

root@bibo:/# cat /etc/mtab
/dev/hde1 / reiserfs rw 0 0
proc /proc proc rw 0 0
/dev/hde3 /files jfs rw 0 0
/dev/hde6 /var reiserfs rw 0 0
/dev/hde7 /usr reiserfs rw 0 0
/dev/hde8 /tmp reiserfs rw 0 0
/dev/hde9 /usr/local reiserfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0


I want to backup the data on hde3 and reformat it as ReiserFS, but I have had trouble trying to copy all my files. It seems that some of the files whose names contain exotic characters are no longer accessible. Any file with ö á é ü or something similar shows up in 'ls' and 'find', but the single character has been replaced by '??', or sometimes '?¬' or just '?', but it always contains a question mark as the first character. For instance:

root@bibo:/files/music/MP3# find | grep '??'
./Crosby, Stills, Nash & Young/Crosby, Stills, Nash & Young - So Far - 01 - D??j?˙ Vu.mp3
./Eddie From Ohio/Eddie From Ohio - Quick - 08 - C?_ndido & Am??rica.mp3
./James Taylor/James Taylor - Flag - 11 - Chanson Fran??aise.mp3
find: ./M??tley Cr?¬e: No such file or directory
./Mark Knopfler/Mark Knopfler - Golden Heart - 10 - Je Suis D??sol??.mp3
./Mark Knopfler/Mark Knopfler - Golden Heart - 11 - R?¬diger.mp3
./Richie Havens/Richie Havens - R??sum?? - 01 - High Flyin' Bird.mp3

This is just a fraction of the lines returned by grep, but you should get the idea. 'D??j?˙' should be 'Déjá', 'Fran??aise' should be 'Française', and etc.

When I do a 'du', a new error comes up:

root@bibo:/files/music/MP3# du | grep cannot
du: cannot access `./Crosby, Stills, Nash & Young/Crosby, Stills, Nash & Young - So Far - 01 - D??j?˙ Vu.mp3': No such file or directory
du: cannot access `./Eddie From Ohio/Eddie From Ohio - Quick - 08 - C?_ndido & Am??rica.mp3': No such file or directory
du: cannot access `./James Taylor/James Taylor - Flag - 11 - Chanson Fran??aise.mp3': No such file or directory
du: cannot access `./Mark Knopfler/Mark Knopfler - Golden Heart - 10 - Je Suis D??sol??.mp3': No such file or directory
du: cannot access `./Mark Knopfler/Mark Knopfler - Golden Heart - 11 - R?¬diger.mp3': No such file or directory
du: cannot access `./M??tley Cr?¬e': No such file or directory
du: cannot access `./Richie Havens/Richie Havens - R??sum?? - 01 - High Flyin\' Bird.mp3': No such file or directory

Again, this is just a fraction of the lines returned by 'grep'. Also, 'du' reports that there is "No such file or directory" for all of the corrupted file names. I hope that these files still exist, and it is possible to retrieve them.

Here is my JFS version:

root@bibo:/files/music# jfs_fsck -V
jfs_fsck version 1.1.6, 28-Apr-2004
processing started: 2/13/2005 0.5.53

Does anybody know how I can get these files back? Any help would be very much appreciated.

gd2shoe 02-13-2005 01:27 AM

Can't help specifically, though I am interested to see what can be done.

I find your post a little confusing. It looks like it didn't render some characters properly. You might try posting again (or editing your post) using code blocks. These are much more literal in what they display.

Code:



RodimusProblem 02-13-2005 01:43 AM

okay, did you already format or are still trying to copy the files?

A few weeks ago I moved 8 GB of data from ext3 to vfat and back to ext3 again (reformat, backup, restore).

Some of this data contained files with special characters in their name.

My solution:

1. Tar the data to be saved in a new tarball. In my case directories became their own tarballs. The name of the tarball shouldn't include any special characters. The filenames will be preserved in the tarballs.

2. Move the files.

3. Reformat

4. Move files back.

5. Untar the archives and restore the directory structure.

Took forever but it worked. ;)

fuzzyspud 02-13-2005 10:50 AM

gd2shoe: The post renders on my computer exactly as I intended. Can you be more specific as to what you think is wrong?


RodimusProblem: I'm still trying to copy the files. The format doesn't have to happen soon, it's just something I'd like to get to eventually.

I tried to tar the 'Richie Havens' directory in my music folder. I chose this because the directory name doesn't contain any special characters, and there are files inside both with and without special characters.

This is what happens when I try to ls the directory:

root@bibo:/files/music/MP3# ls Richie\ Havens/
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 01 - High Flyin' Bird.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 02 - Drown In My Own Tears.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 03 - Morning, Morning.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 04 - Just Like A Woman.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 05 - The Dolphins.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 06 - Here Comes The Sun.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 07 - God Bless The Child.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 08 - The Klan.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 09 - Handsome Johnny.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 10 - Follow.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 11 - Younger Men Grow Older.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 12 - Medley Run Shaker LifeDo You Feel Good.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 13 - What About Me.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 14 - Minstrel From Gault.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 15 - Rocky Raccoon.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 16 - San Francisco Bay Blues.mp3: No such file or directory
/usr/bin/ls: Richie Havens/Richie Havens - R??sum?? - 17 - Freedom.mp3: No such file or directory
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 01\ -\ Lives\ in\ the\ Balance.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 02\ -\ They\ Dance\ Alone.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 03\ -\ My\ Father's\ Shoes.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 04\ -\ Darkness,\ Darkness.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 05\ -\ The\ Hawk.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 06\ -\ Young\ Boy.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 07\ -\ The\ Times\ They\ Are\ a-Changin'.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 08\ -\ Fade\ to\ Blue.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 09\ -\ Intro\ +\ Old\ Love.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 10\ -\ How\ the\ Nights\ Can\ Fly.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 11\ -\ Comin'\ Back\ to\ Me.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 12\ -\ Don't\ Pass\ It\ Up.mp3*
Richie\ Havens\ -\ Cuts\ to\ the\ Chase\ -\ 13\ -\ At\ a\ Glance.mp3*

The ls returns all files without special characters, but it says "No such file or directory" for the others that have Résumé in the title.

When I try to tar the directory:

root@bibo:/files/music/MP3# tar -cf richie_havens.tar Richie\ Havens/
tar: Richie Havens/Richie Havens - R??sum?? - 01 - High Flyin' Bird.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 02 - Drown In My Own Tears.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 03 - Morning, Morning.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 04 - Just Like A Woman.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 05 - The Dolphins.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 06 - Here Comes The Sun.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 07 - God Bless The Child.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 08 - The Klan.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 09 - Handsome Johnny.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 10 - Follow.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 11 - Younger Men Grow Older.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 12 - Medley Run Shaker LifeDo You Feel Good.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 13 - What About Me.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 14 - Minstrel From Gault.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 15 - Rocky Raccoon.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 16 - San Francisco Bay Blues.mp3: Cannot stat: No such file or directory
tar: Richie Havens/Richie Havens - R??sum?? - 17 - Freedom.mp3: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

It seems that 'stat' fails when tar executes.

gd2shoe 02-13-2005 08:20 PM

Hmmm. I just opened this page in konqueror and it rendered fine. Seems to be a firefox problem. Just ignore me. Carry on.

RodimusProblem 02-14-2005 02:58 AM

I used Ark to tar the files as the command line gave me similar errors. ;)


All times are GMT -5. The time now is 06:34 AM.