file size in bytes is different in ftp and local pc


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers file size in bytes is different in ftp and local pc
# 1  
Old 06-04-2007
file size in bytes is different in ftp and local pc

Hi
how can it be that say i have text (xls) file that is 661 bytes when i upload it to Solaris ftp its becomes 650 byes
and when i downloading it back its again 661 bytes
both in my local pc and Solaris ftp the file remains not corrupted and valid
# 2  
Old 06-04-2007
cksum

Hi,
I am just curious to know the checksum of the two files,

Code:
cksum <file1> <file2>

Thanks
Nagarajan Ganesan.
# 3  
Old 06-04-2007
Quote:
Originally Posted by umen
Hi
how can it be that say i have text (xls) file that is 661 bytes when i upload it to Solaris ftp its becomes 650 byes
and when i downloading it back its again 661 bytes
both in my local pc and Solaris ftp the file remains not corrupted and valid
in unix, the line terminator is a \n (Line feed)

in microsoft - the line terminator in \r\n (carriage return line feed)

Bet your file as 11 lines it it. The difference is the extra character that is added in the conversion from unix to dos type ascii files.

Transfer in binary if you want the same file size. But may not be usable in some dos applications.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to monitor for new file with ext .err and size > 0 bytes and perform a action or command

Hi All, I need to create a script to monitor a dir for new files with ext .err and also it should b a non empty files. and perform a action or command . We have a new ETL application that runs on a linux server, every times a etl fails it creates a .err file or updates the existing .err... (4 Replies)
Discussion started by: MAKHAN
4 Replies

2. Shell Programming and Scripting

Validating the size of file transferred from ftp server to the local system

Validating the size of file transferred from ftp server to the local system. File type: Text file/Flat file Source System: Windows / Unix Systems Target System is always: Unix Mode of Transfer : ASCII We have generic ftp shell script that transfers the files from different ftp servers. ... (2 Replies)
Discussion started by: jpundalik
2 Replies

3. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies

4. Shell Programming and Scripting

How to find size 0-4 bytes files?

Hi I need to find and delete 0-4 bytes size files in a folder. How can I achieve that? (1 Reply)
Discussion started by: kapilk
1 Replies

5. Shell Programming and Scripting

How to download X bytes from a file using ftp or http?

Hi, I have a simple ftp shell script which can download the entire file, however I want to know if there is anyway that I can download only the partial content, say X bytes from a file. If so, how I can do it using ftp and http.. Here is my sample script #!/bin/sh HOST='xyz.com' ... (5 Replies)
Discussion started by: learn more
5 Replies

6. Shell Programming and Scripting

file size comparision local file and remote file

Hi, I have written a script which would FTP a dump file to the FTP server and log the whole activity into a file. to confirm the success of the file copy i grep for "226 file receive OK" and then send out an email saying success. Now i want to make sure the bytes of the local file and... (4 Replies)
Discussion started by: dba.admin2008
4 Replies

7. Shell Programming and Scripting

Remove first N bytes and last N bytes from a binary file on AIX.

Hi all, Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this? Your help is greatly appreciated!! Best Regards, Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies

8. UNIX for Dummies Questions & Answers

How to get the size of process in Bytes

Hi All, We have the commands top and ps through which we can find out the size of the running process. These commnds are giving the size of my process in MB after rounding of the size. Is there any way by which I can get the size of my process in Bytes or KBytes. Any help would be greatly... (2 Replies)
Discussion started by: darshi
2 Replies

9. Shell Programming and Scripting

Email message if file size > 0 bytes

I want to create a script that emails a file created by Informix Ace if the file size is > 0. It is a list of exceptions. No exceptions...no message This does not work: THESIZE=`ls -lA /tmp/ds_treo.txt | awk -F' ' '{print $5}'` if then (cat $DSDIR/ds_treo.txt) | mail -s "Treo... (1 Reply)
Discussion started by: poste_d_ordure
1 Replies
Login or Register to Ask a Question