Are you FTPing the files in binary or text mode?
--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/
What is a "so file"? I've been working with various flavors of computer
and O/S since about 1966! This is my first encounter with the term "so
file"!
Never compiled/linked/run a program on a UNIX computer?
"so" = shared object: <http://www.file-extensions.org/so-file-extension>
On a Solaris system, do this:
$ ls /usr/lib | grep "so" | wc -l
over 870 "so" files on my Solaris 10 system.
Thank you!
Your original problem may be due to using FTP in "text mode" rather than
in binary mode. AIRC text mode is the default and you must say "bin" to
switch to binary mode. The most probable cause for the change in size
is that the receiving FTP program will insert the customary local line
terminator at the end of each text record. This will be <lf> for Unix,
<cr><lf> for Windows, and used to be <cr> for MacIntosh, etc.
I guessed what a 'so' file was, but it is hardly a well used term. Most people
would say they copied a shared library, not a 'so file'.
BTW, grep has a -c option, which counts the number of times the expression is
found, without the need to pipe to 'wc'.
--
I respectfully request that this message is not archived by companies as
unscrupulous as 'Experts Exchange' . In case you are unaware,
'Experts Exchange' take questions posted on the web and try to find
idiots stupid enough to pay for the answers, which were posted freely
by others. They are leeches.
Interesting, and thank you!
Lots of UNIX commands/programs have changed over the almost 40 years I've
been using them; old habits die hard. :-)
Another one is the (new, circa early 1990s) implicit -print option in
many versions of find if one's only searching for, say, files.
The best way is to use the "sum" command. If the files are the same,
the check sum that sum produces will be the same.
Brad
I would suggest 'cksum' is better than 'sum', as the former is portable, and the
latter is implementation dependent. Two different machines can give a different
'sum' to the same file (I found this out when testing software on a wide variety
of Unix operating systems). In contrast, all machines will give the same result
for 'cksum'.
Clearly using an md5 checksum would give a higher degree of confidence, but it
is more computationally intensive.
Dave
Is it true that text mode works fine as you're going from
some kind of unix/linex to eg solaris?
David
And probably requires a lot more to learn, too, getting
into all that crypto stuff.
>
>Dave
Text mode works for sending/receiving text files. For binary files, you
must transfer in binary mode.
Text mode works fine if you are sending or receiving text.
If you are sending or receiving binary files, you must say "bin" to put
the connection into binary mode. To switch back, I think you say ascii.
It has been a few years since I last used FTP. You can say "help" at
the prompt. The "help" you get may or may not be helpful but that's all
there is. If you can't figure it out you can hire a consultant.
Not at all, just use digest.
% which digest
/usr/bin/digest
% digest -a md5 /lib/libc.so
659fc0b7631c81bbb504231bc991813f