This problem's been coming up for a while, so here's a generic solution. It takes the command you want to run as arguments, running it once per chunk feeding it file data via STDIN, and substitutes @FNAME@ with an 8-digit incrementing sequence.
Adjust the value of chunk to taste, it's the number of megabytes.
How can I execute a script on a unix server via ftp from a Windows machine?? Can't use cron/at to schedule the execution and don't want to open up a telnet session just to do it. I want to be able to kick it off after I send the script over on a nightly basis. Reason is script parameter changes... (4 Replies)
Hi All,
I want to ftp a file from Windows 2000 to Unix. The file is present in a remote server which has been mapped to one of my drives. I am not able to connect to that directory.
I am getting an error saying
?Invalid command
550 //hbxs02/shared No such file or directory.
The... (0 Replies)
Hello Everybody
I have two servers, name A & B. I need to take a backup of one directory(/girish) on serverA. But my tape drive is in serverB through tar command. But when I run the following command it doesn't take the backup. Could any one correct my command to take a backup
tar cvf - ... (0 Replies)
HI all,
I need to post some files on to a clients machine and they said we can ftp without username and password. I do the same as a command line it works ftp <hostname>. but when I do that through a script it asks for user name and pasword.
Can any one help me how to do a file ftp.
... (4 Replies)
Hi all,
Have used ftp to transfer files from remote host to localhost.
I was wondering how can I ftp into remote hosts.
for example from a unix box, connect to an external server and then ftp that file into mainframe ? I would like to avoid pulling it to unix box and then ftping to mainframe.... (1 Reply)
Hey all,
I want to automate tarring a directory then using ftp to transfer the files over.
I was able to put the commands together but what I'm noticing is that only the very first file is being tarred and then transferred.
tar cvpf new.backup sourceAbove is the command I'm using which works... (4 Replies)
Hi,
I'm fairly new to Linux and need help with a script to ftp a .csv file to a remote server. I can ftp the .csv file manually from my server to the remote server in the "/" location.
When I execute the script I receive the following message Could not create file.
Here's what I have for... (5 Replies)
HI
Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything working fine:
$( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' )
but i have to ... (1 Reply)
HI All
Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything is working fine:
$( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' )
but when im... (9 Replies)
Discussion started by: BACya
9 Replies
LEARN ABOUT CENTOS
pack_fopen_chunk
pack_fopen_chunk(3alleg4) Allegro manual pack_fopen_chunk(3alleg4)NAME
pack_fopen_chunk - Opens a sub-chunk of a file. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
PACKFILE *pack_fopen_chunk(PACKFILE *f, int pack);
DESCRIPTION
Opens a sub-chunk of a file. Chunks are primarily intended for use by the datafile code, but they may also be useful for your own file rou-
tines. A chunk provides a logical view of part of a file, which can be compressed as an individual entity and will automatically insert and
check length counts to prevent reading past the end of the chunk. The PACKFILE parameter is a previously opened file, and `pack' is a bool-
ean parameter which will turn compression on for the sub-chunk if it is non-zero. Example:
PACKFILE *output = pack_fopen("out.raw", "w!");
...
/* Create a sub-chunk with compression. */
output = pack_fopen_chunk(output, 1);
if (!output)
abort_on_error("Error saving data!");
/* Write some data to the sub-chunk. */
...
/* Close the sub-chunk, recovering parent file. */
output = pack_fclose_chunk(output);
The data written to the chunk will be prefixed with two length counts (32-bit, a.k.a. big-endian). For uncompressed chunks these will both
be set to the size of the data in the chunk. For compressed chunks (created by setting the `pack' flag), the first length will be the raw
size of the chunk, and the second will be the negative size of the uncompressed data.
To read the chunk, use the following code:
PACKFILE *input = pack_fopen("out.raw", "rp");
...
input = pack_fopen_chunk(input, 1);
/* Read data from the sub-chunk and close it. */
...
input = pack_fclose_chunk(input);
This sequence will read the length counts created when the chunk was written, and automatically decompress the contents of the chunk if it
was compressed. The length will also be used to prevent reading past the end of the chunk (Allegro will return EOF if you attempt this),
and to automatically skip past any unread chunk data when you call pack_fclose_chunk().
Chunks can be nested inside each other by making repeated calls to pack_fopen_chunk(). When writing a file, the compression status is
inherited from the parent file, so you only need to set the pack flag if the parent is not compressed but you want to pack the chunk data.
If the parent file is already open in packed mode, setting the pack flag will result in data being compressed twice: once as it is written
to the chunk, and again as the chunk passes it on to the parent file.
RETURN VALUE
Returns a pointer to the sub-chunked PACKFILE, or NULL if there was some error (eg. you are using a custom PACKFILE vtable).
SEE ALSO pack_fclose_chunk(3alleg4), pack_fopen(3alleg4)Allegro version 4.4.2 pack_fopen_chunk(3alleg4)