LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   file get renamed when copied to external hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/file-get-renamed-when-copied-to-external-hard-drive-169608/)

pgajeski21 04-13-2004 11:48 AM

file get renamed when copied to external hard drive
 
I have a Western Digital External Harddrive USB 2.0 i have entry in the fstab file to mount it. The drive mounts fine. When i try to copy a file to the Western Digital External Harddrive USB 2.0 the file gets renamed.
Example: AAAAA.txt becomes aaaaa.txt

jailbait 04-13-2004 01:51 PM

"I have a Western Digital External Harddrive USB 2.0 i have entry in the fstab file to mount it. The drive mounts fine. When i try to copy a file to the Western Digital External Harddrive USB 2.0 the file gets renamed.
Example: AAAAA.txt becomes aaaaa.txt "

This may be caused by the file system on the Western Digital External Harddrive. Some file systems can only support simple file names. What file system type are you using on the Western Digital External Harddrive?


-------------------------
Steve Stites

pgajeski21 04-13-2004 02:23 PM

the drive comes preformatted as vfat

jailbait 04-13-2004 02:38 PM

"the drive comes preformatted as vfat"

Maybe Linux thinks that the drive only supports the old DOS 8.3 name format. Try creating a long name like:
mammys.little.babies.like.shortning.bread
and see what name is actually created on the hard drive.

Check what file system type that it is mounted as with the mount command:
mount

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

pgajeski21 04-13-2004 05:43 PM

The drive is mounted as vfat in the fstab file.
I created to long file names on the harddrive they both worked fine. When i do a mkdir AAAA it makes it aaa but i can access AAA fine. When i copy that dir make to the linux box need to access as aaa. Same thhin happens when file are copied. I was thinking about reformatting the drive as ntfs??

paul

jailbait 04-13-2004 06:18 PM

"I was thinking about reformatting the drive as ntfs??"

I don't know anything about ntfs so I don't know if that will fix the problem or not.

You could check to see if the problem is in the mkdir command. Use mkdir to create BBBB on your Linux hard drive. Check to make sure that it is BBBB and not bbbb. Then cp BBBB to the vfs drive and check to see whether it is named BBBB or bbbb. If cp copies the name correctly then the problem is in the mkdir command. If BBB changes to bbbb then the problem has something to do with the way Linux handles vfat directories.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

pgajeski21 04-14-2004 08:59 AM

I just plugged the drive into a windows box and everthing displays fine.
i am at my wits end.

jailbait 04-14-2004 10:13 AM

"the drive comes preformatted as vfat"

Can you use Windows to check whether the drive was really preformatted as vfat or was it preformatted ntfs?

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

pgajeski21 04-14-2004 01:20 PM

i reformatted the drive as ntfs. that was a no go
Linux did not like that.

jailbait 04-14-2004 01:54 PM

"i reformatted the drive as ntfs. that was a no go
Linux did not like that."

Try having Linux format the drive as vfat and see if both Linux and Windows will accept that.

--------------------------
Steve Stites

pgajeski21 04-15-2004 10:20 AM

this is going to sound bad but,

HOW do i do that???


paul

jailbait 04-15-2004 10:33 AM

You use the mkfs.vfat command against an umounted drive. So, supposing that your usb hard drive is /dev/scd0 then you would use the following commands:

umount /dev/scd0
mkfs.vfat /dev/scd0

See:
man mkfs


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites


All times are GMT -5. The time now is 04:12 PM.