Well, see, there you have a problem. Cause tar needs filenames. Atleast the Solaris tar barfed saying something like that... If you just want to write to an output file, why not use dd?
--EDIT
Just tried tar on Linux and it failed too. Here's the simulation that I am using. It may not be anywhere near what you have, but its the closest that I'm gonna get.
And here's how I am using dd:
Cheers
Last edited by blowtorch; 08-22-2006 at 12:03 PM..
omg i need help so bad. I've been working on a school project for what seems like an eternity and i'm close to deadline. Using FIFO's (i ahve to) to communicate between parent and child proc's. Right now I'm stuck on a read/write.
fifomsg is a struct with int length and char message fields. ... (5 Replies)
Hi, so I've got this program("main") that fork executes another ("user"). These programs communicate through fifos.
One communication is a spawn call, where user passes an executable, main forks and executes it. So, I'm keeping track of all my processes using a task table. After the fork (for... (6 Replies)
This isn't strictly a Linux question, but... I've been working on a project to archive some streaming media for time shifting using 'mplayer' and have been using FIFOs to archive in Ogg Vorbis format:
mkfifo program_name.wav
(mplayer -ao pcm -aofile program_name.wav &)... (0 Replies)
Is there a performance advantage of one of these over the other? Obviously, it makes no sense to use normal TCP sockets or UDP sockets w/ the overhead they carry. But what about UNIX domain sockets vs FIFOs? I'd think they'd be very similar, in terms of performance and in terms of how they're... (2 Replies)
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
I want to have a message send & receive through 2 uni-direction FIFO
Flow of data
FIFO1
stdin--->parent(client) writefd--->FIFO1-->child(server) readfd
FIFO2
child(server) writefd2---->FIFO2--->parent(client) readfd2--->stdout
I need to have boundary structed message... (3 Replies)
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Coming from this thread, just wondering if there is an option to check if the Tar of the files/directory will be without any file-errors without actually making the tar.
Scenario:
Let's say you have a directory of 20GB, but you don't have the space to make Tar file at the moment, and you want... (14 Replies)
Discussion started by: filosophizer
14 Replies
LEARN ABOUT CENTOS
tar_append_file
tar_append_file(3) C Library Calls tar_append_file(3)NAME
tar_append_file, tar_append_eof, tar_append_regfile - append data to tar archives
SYNOPSIS
#include <libtar.h>
int tar_append_file(TAR *t, char *realname, char *savename);
int tar_append_regfile(TAR *t, char *realname);
int tar_append_eof(TAR *t);
VERSION
This man page documents version 1.2 of libtar.
DESCRIPTION
The tar_append_file() function creates a tar file header block describing the file named by the realname argument, but with the encoded
filename of savename. It then sets the current header associated with the TAR handle t to the newly created header block, and writes this
block to the tar archive associated with t. If the file named by realname is a regular file (and is not encoded as a hard link),
tar_append_file() will call tar_append_regfile() to append the contents of the file.
The tar_append_regfile() function appends the contents of a regular file to the tar archive associated with t. Since this function is
called by tar_append_file(), it should only be necessary for applications that construct and write the tar file header on their own.
The tar_append_eof() function writes an EOF marker (two blocks of all zeros) to the tar file associated with t.
RETURN VALUES
On successful completion, these functions will return 0. On failure, they will return -1 and set errno to an appropriate value.
ERRORS
The tar_append_*() functions will fail if:
EINVAL Less than T_BLOCKSIZE bytes were written to the tar archive.
EINVAL Less than T_BLOCKSIZE bytes were read from the realname file.
They may also fail if any of the following functions fail: lstat(), malloc(), open(), read(), th_write(), or the write function for the
file type associated with the TAR handle t.
SEE ALSO read(2), open(2), lstat(2), th_write(3)University of Illinois Jan 2001 tar_append_file(3)