LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 06-02-2009, 07:57 AM   #1
invader44
Member
 
Registered: Dec 2008
Location: America
Distribution: Ubuntu 11.04
Posts: 64

Rep: Reputation: 15
filename changes


I am running slackware 12.0 on my machine. I have two files on my windows computer that I wanted to bring over to my slackware server. So I copied the two files to a floppy disk on my windows machine. Then went over to my slackware server and did a /mnt/fd0 /mnt/floppy. I did this as root the only strange thing is when I go to look at the files the files are renamed or what I think is happening is they are shortened. So my filename that it should be is this_is_the_filename.ca this is just an example but that is what the filename should be named, after I mount my floppy and look at the files on the floppy disk they are renamed to
this this_p~1.ca why is slackware doing this? Am I mounting the floppy incorrectly? Is there a way to tell slackware to mount to another filesystem type that windows is using?

Thanks in advance
 
Old 06-02-2009, 08:03 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
All filenames on your windows machine follow the 8.3 dos format.
To support long filenames, windows uses the first 6 characters, then a tilda, then a number.

So

thisisalongname.txt becomes thisis~1.txt
thisisanotherone.txt becomes thisis~2.txt

these are the names that are actually attached to the file.

The name that gets displayed alongside the icon is read off a table someplace.

When you copied the files - linux read them correctly as MS wrote them. Windows has been lying to you - but you'll get used to this. (It's actually a feature - it means your files will be backwards compatible with older machines and media which use the old FAT file system.)

AFAIK: the way to get the whole name is to put the file on ntfs media when you walk it over, or transfer the file over a network.

Last edited by Simon Bridge; 06-02-2009 at 08:04 AM.
 
Old 06-02-2009, 08:04 AM   #3
jolphil
Member
 
Registered: May 2002
Location: central florida
Distribution: Linux Mint, ,Mageia,Ubuntu
Posts: 453

Rep: Reputation: 33
My guess it is DOS doing it when it was put on the floppy..
jolphil
Edit : Simon, you beat me by 60 seconds..One finger typeing here..
jolphil

Last edited by jolphil; 06-02-2009 at 08:07 AM.
 
Old 06-02-2009, 08:28 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by jolphil View Post
My guess it is DOS doing it when it was put on the floppy..
jolphil
Edit : Simon, you beat me by 60 seconds..One finger typeing here..
jolphil
No worries

- the floppy is probably FAT32 - which is fine with long filenames.
DOS won't enter into it unless this is a very old Windows (95?) or OP used the terminal to copy the program.

This is actually what Windows does before Vista ... dunno about Vista. Technically, I'd expect the same thing to happen trasferring to windows unless there is some mechanism which stores the long filename on the floppy too. May be worth looking at that floppy with ls -l

Suggested exercize - in Windows, open a DOS terminal and list all files in a directory - see what happens to the long file names?

But you are right - it's nothing to do with linux.
I don't think I've seen this with file transfers involving direct-mount ntfs partitions and ntfs-3g. Of course, it's only two files, so they can be manually renamed.
 
Old 06-02-2009, 11:10 AM   #5
invader44
Member
 
Registered: Dec 2008
Location: America
Distribution: Ubuntu 11.04
Posts: 64

Original Poster
Rep: Reputation: 15
thanks for both replys so fast. that makes sense now why it windows shortened the filenames. I used the cp command instead to rename them with the long filename that I needed. hopefully if someone else runs into this problem it may help them also. I did a cp filename_p~1.ca /etc/newdirectory/longfile_name_thing.ca and it worked! hope this can help somoone else.
 
Old 06-03-2009, 07:25 AM   #6
paul81
LQ Newbie
 
Registered: Feb 2008
Location: Rotterdam, Netherlands
Distribution: Fedora and Ubuntu
Posts: 14

Rep: Reputation: 1
Assuming that both computers are on the same network: why not using the application winscp for transferring files to your linux computer? This will speed up your actions You can find the program here: http://winscp.net/eng/download.php
It's freeware, so you won't have to pay
 
  


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
Change name of backup file in ext3 from filename~ to .filename~ Libu Linux - General 2 07-21-2008 10:29 PM
Convert static library (Filename.a) to dynamic shared object (filename.so) afx2029 Linux - Software 4 08-17-2007 07:07 AM
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 05:33 AM
filename~ djc SUSE / openSUSE 2 02-14-2005 02:52 PM
filename- and filename~ files? slinky2004 Linux - Newbie 5 10-17-2004 11:32 PM


All times are GMT -5. The time now is 12:09 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