Copying files from UNIX server question
Moderators: Hacker, petermad, Stefan2, white
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
Copying files from UNIX server question
Is there a way to set TC to save a file downloaded through FTP in the UNIX file format? It saves it to windows format now, but if I make a file in EditPlus with the UNIX format, it will stay the exact same size after I upload it. It doesn't do that with windows format. The file size is always smaller on the server after I upload a windows file to the unix server.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
Thank you, that did the trick. But I need to ask, will it cause any problems that I am not thinking of? I only want it to work on PHP and text files.Sob wrote:Set transfer mode to binary.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
Probably not. Binary mode just transfers files as they are, while text mode converts line endings. No further difference. So in case you have file with Windows line endings, it will be transfered to server without changes. For web pages it doesn't matter, web server just sends them to client and does not care about the content. But if you write e.g. some shell script on Windows, forget to convert Windows line endings to Unix ones and upload it using binary mode, then the system won't like it much.
You may consider editing the line:
[General]
ASCII=
In your wcx_ftp.ini file - it determines which file types that should be treated as non-binary files in Automatic mode. Remove *.txt and .php form this line if you have them there.
[General]
ASCII=
In your wcx_ftp.ini file - it determines which file types that should be treated as non-binary files in Automatic mode. Remove *.txt and .php form this line if you have them there.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sure, XML is binary fine too. I am actually transferring tons of files between Win/Solaris back and fort via TC build in FTP and I am using only and only binary mode. If I need to transfer shell script that requires unix delimiters, I am saving that file as an Unix file (in Textpad).
...in fact as far as I know windows native Notepad.exe is the only editor that cannot handle unix line delimiters correctly
ado
...in fact as far as I know windows native Notepad.exe is the only editor that cannot handle unix line delimiters correctly

ado
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
It would be wise to transfer htm and html files as text, though, wouldn't it?
What kind of shell scripts are you meaning? I guess I haven't done any of those yet.
What kind of shell scripts are you meaning? I guess I haven't done any of those yet.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
Unless the bandwidth is an issue, I would advise against ASCII mode transfer in general as it can introduce some problems that are sometimes hard to notice. Also, IMHO, this is a bad transfer option as you can not be sure that you have 1:1 copy... And sometimes, somewhere at some point you'll run into problems. I know I had, so I now only use binary, never ASCII.It would be wise to transfer htm and html files as text, though, wouldn't it?
Ambiguity succeeds where honesty dares not venture.
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
Won't html files get weird characters in them from binary transfer? Are there any files that are transferred safer as ASCII than binary? I just want to make sure I have all my bases covered.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
The translation done by text mode does not affect anything except line endings. Direction from Windows to Unix takes CR+LF and converts it to bare LF. And the other way does the opposite. For html files it makes no difference, browsers don't (and even can't) care about line endings, because they must support both. Unlike character sets, there's no attribute to specify what type of line endings html document uses.
The only weird character you could see is ^M if you open the file with Windows line endings in Midnight Commander's editor on Unix system (possibly in other editors too, but I usually only use the one in MC).
Personally I always use binary mode, because I don't like some FTP server messing with my files. I know best what kind of line endings I want. :)
The only weird character you could see is ^M if you open the file with Windows line endings in Midnight Commander's editor on Unix system (possibly in other editors too, but I usually only use the one in MC).
Personally I always use binary mode, because I don't like some FTP server messing with my files. I know best what kind of line endings I want. :)