Sponsored Content
Full Discussion: Binary File Transfer
Top Forums Programming Binary File Transfer Post 16546 by Perderabo on Monday 4th of March 2002 08:14:22 AM
Old 03-04-2002
UDP is unreliable by intent, I would expect that some datagrams would be lost. I can't believe that there is a difference between ascii and binary data. I can believe that there is a difference between a little bit of data and a lot of data. Could you be using small ascii files and large binary files? And your comment that the bytes match throws me. If the bytes are ok, what more do you ask from a file transfer?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

binary file

please let me know how can i mail the binary files is it can be done thru pine? is there any other way to do it? wat are the changes in system i have to make and one more thing i am sending data to a message queue and then retriving the data from the queue but when i do the ipcs... (1 Reply)
Discussion started by: ramneek
1 Replies

2. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

3. Programming

Binary file

Hi all I have a C program to write it's output into a textfile which is also created by the program in between. The file that's get created prompt's a message while opening manually that the file is binary and any change in that leads to it's corruption. I have used putc() to write the output... (2 Replies)
Discussion started by: joshighanshyam
2 Replies

4. Shell Programming and Scripting

To log binary file output to a txt file

Hi, I wrote a small script whose function is to execute the postemsg provided if the threshold breaches. I want to log this postemsg messages to a log file. But I am not able to do. Can someone throw some light on how to log the output of this. I am pasting a snippet of that code. ... (2 Replies)
Discussion started by: dbashyam
2 Replies

5. UNIX for Dummies Questions & Answers

Pipe binary file matches grep results to file

I am using grep to match a pattern, but the output is strange. $ grep -r -o "pattern" * Gives me: Binary file foo1 matches Binary file foo2 matches Binary file foo3 matches To find the lines before/after, I then have to use the following on each file: $ strings foo1 | grep -A1 -B1... (0 Replies)
Discussion started by: chipperuga
0 Replies

6. UNIX for Advanced & Expert Users

How to copy a binary file while the file is being written to by another process

Hello, Can I copy a binary file while the file is being written to by another process? Another process (program) “P1” creates and opens (for writing) binary file “ABC” on local disk. Process P1 continuously write into ABC file every couple of seconds, adding 512-byte blocks of data. ABC file... (1 Reply)
Discussion started by: mbuki
1 Replies

7. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies

8. UNIX for Dummies Questions & Answers

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012 TuxConnectorURA.20121012: data or International Language text less TuxConnectorURA.20121012... (2 Replies)
Discussion started by: EnioMarques
2 Replies

9. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

10. UNIX for Beginners Questions & Answers

How to set file transfer in binary mode in SFTP using Expect?

The below is my script. /usr/bin/expect<<EOD spawn /usr/bin/sftp -o Port=$PORT $USER@$HOST expect "sftp>" expect "password:" set timout 15 send "$password\r" expect "sftp>" send "lcd $remotedir\r" expect "sftp>" ... (1 Reply)
Discussion started by: Anilsaggu9
1 Replies
TYPERULES(5)							File Formats Manual						      TYPERULES(5)

NAME
typerules - HylaFAX file type identification and conversion rules DESCRIPTION
Only three types of files are accepted by the HylaFAX server for transmission as facsimile: POSTSCRIPT(R) files, PDF files, and TIFF Class F (bilevel Group 3-encoded) files. All other types of files must be converted to one of these three formats. The facsimile submission program applies a set of rules against the contents of each input file to identify the file's type and to figure out how to convert the file to a format that is suitable for transmission. These rules are stored in the file /etc/hylafax/typerules, an ASCII file that is pat- terned after the /etc/magic file used by the System V file(1) program. However, there are significant differences, noted below. Type rules work by matching data patterns in a file; typically patterns that appear in the first few bytes of the file (i.e. magic num- bers). There are two types of rules, primary rules and secondary rules. Secondary rules specify additional rules to apply after a primary rule has been matched. When secondary rules are used, rule scanning continues up to the next primary type rule in the file. Each rule consists of a set of whitespace-separated fields: offset datatype match result command If an line is terminated wth a backslash character, the entry is continued on the next line with any leading whitespace characters com- pressed to a single space. Comments are marked with the ``#'' character; everything from to the end of the line is discarded. Secondary rules have a ``>'' character in the first column of the line; primary rules do not. The fields in each rule entry are: offset The byte offset in the file at which data should be extracted and compared to a matching string or value. datatype The type of data value to extract at the specified offset for comparison purposes; one of: ``byte'' (8 bit unsigned number), ``short'' (16 bit unsigned number), ``long'' (32 bit unsigned number), ``string'' (an array of bytes), ``istring'' (a case-insen- sitive array of bytes), or ``ascii'' (an array of ASCII-only bytes). match The value and operation to use in matching; the value used is based on the datatype field. If value is ``x'', then it is inter- preted to mean match anything; otherwise the following operators are supported (where data is the value extracted from the file and value is specified in the match field) except for types ``string'', ``istring'', and ``ascii'': = data == value != data != value > data > value < data < value <= data <= value >= data >= value & (data & value) == value ! (data & value) != value ^ (data ^ value) != 0 If no operation is specified then ``='' is used. For ``string'', ``istring'', and ``ascii'' no operator is allowed; the implicit operation is always ``=''. In these cases, the field is terminated by a tab or end of line, not by ``#''. Characters in the field have their literal value; there are no C-style character escapes. result One of ``ps'', ``tiff'', or ``error'' (case insensitive). The first two results specify whether the rule generates a POSTSCRIPT file or a TIFF/F file (Group 3-encoded bilevel data), respectively. The ``error'' result indicates that a file is unsuitable for transmission and, if supplied for transmission, should cause the job to be aborted with the command field used in an error mes- sage. command A command description that is expanded and passed to the shell to convert the input file to the result format (suitable for send- ing as facsimile). Before the string is passed to the shell, it is scanned and the following ``%'' escape codes are substituted for: %i input file name %o output file name %r output horizontal resolution in pixels/mm %R output horizontal resolution in pixels/inch %v output vertical resolution in lines/mm %V output vertical resolution in lines/inch %f data format, ``1'' for 1-d encoding or ``2'' for 2-d encoding %w page width in pixels %W page width in mm %l page length in pixels %L page length in mm %s page size by name %F the directory where HylaFAX filter programs reside %<x> the <x> character (e.g. ``%%'' results in ``%'' See below for example uses of these codes. EXAMPLES
The following rules are used to match the formats that are handled directly by the server: #offset datatype match result command 0 string %! ps # POSTSCRIPT 0 string %PDF ps # POSTSCRIPT by Ghostscript 0 short 0x4d4d tiff # big-endian TIFF 0 short 0x4949 tiff # little-endian TIFF These rules are used to process the ASCII version of IRIS Inventor database files while blocking the transmission of the binary format variant: #offset datatype match result command 0 string #Inventor V error IRIS Inventor file >15 string binary error binary IRIS Inventor file >15 string ascii ps %F/textfmt -fCourier-Bold -p11bp -U -q >%o <%i This rule is typically the last entry in the file and is used to convert all unmatched ASCII data files to POSTSCRIPT: #offset datatype match result command 0 ascii x ps %F/textfmt -fCourier-Bold -p11bp -U -q >%o <%i NOTES
It is much better to convert data that is to be transmitted to POSTSCRIPT because this data format permits the facsimile server to do the final imaging according to the optimal transfer parameters (resolution, binary encoding, etc.). It might be better to allow secondary rules to augment a primary rule rather than just replace them. This would allow, for example, com- mand line options to be selected based on file type. SEE ALSO
sendfax(1), hylafax-client(1) May 12, 1993 TYPERULES(5)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy