ARCHIVE_READ_HEADER(3) BSD Library Functions Manual ARCHIVE_READ_HEADER(3)NAME
archive_read_next_header, archive_read_next_header2 -- functions for reading streaming archives
LIBRARY
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS
#include <archive.h>
int
archive_read_next_header(struct archive *, struct archive_entry **);
int
archive_read_next_header2(struct archive *, struct archive_entry *);
DESCRIPTION
archive_read_next_header()
Read the header for the next entry and return a pointer to a struct archive_entry. This is a convenience wrapper around
archive_read_next_header2() that reuses an internal struct archive_entry object for each request.
archive_read_next_header2()
Read the header for the next entry and populate the provided struct archive_entry.
RETURN VALUES
These functions return ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered),
ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the operation failed but can be retried), and ARCHIVE_FATAL (there was a fatal
error; the archive should be closed immediately).
ERRORS
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions.
SEE ALSO tar(1), libarchive(3), archive_read(3), archive_read_data(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3),
archive_read_open(3), archive_read_set_options(3), archive_util(3), tar(5)BSD February 2, 2012 BSD
Hi,
I want to archive below directories
ex: /home/oracle/ddd0
/home/oracle/ddd1
/home/oracle/ddd2
I want a command(tar) which will let me archive the above directories excluding *.dmp(dump files), *.log(log files) in those directories.
So the archived file doesn't have... (4 Replies)
Hi All
Please excuse another straightforward question. When creating a tar archive from a directory I am attempting to use wildcards to eliminate certain filetypes (otherwise the archive gets too large). So I am looking for something along these lines.
tar -cf archive.tar * <minus all *.rst... (5 Replies)
Hi,
I make a tar archive:
tar -czvf /path_to/cucu.tar.gz /path/dir_to_archive/
In the archive the /path/dir_to_archive/ is maintained for every file.
I need that the archive to be made without the /path/dir_to_archive/ to contain only the files in /path/dir_to_archive/.
Thanks,... (4 Replies)
Would appreciate if any one can paste a generic schell script to archive a file with date stamp by passing the file with fullpath as parameter
For Eg. /apps/scripts/Archive_File.sh /data_home/project_home/file.txt
this should place the file in the following directory
... (8 Replies)
I have a 13G gz archive... The problem is that when I expand it, it goes to 300G and I don't have so much of hdd space. The file is a one huge file: rrc.tar.gz. What I want to do is to extract the archive but at each step gzip the resulting file.
So, if
gunzip -c rrc00.tar.gz | tar -xvf -
... (9 Replies)
Hi Unix Gurus,
I would like to seek some advises regarding tar. I've received this error:
tar: The getwd subroutine failed.
Cannot open the parent directory.
when i try to tar some files in the directory.
Is this something to do with the file permission of the parent... (8 Replies)
Hi,
When I use -p option(preserve permissions) while creating tar archives, it throws error and creates archive in the name of 'p'. But without -p option I am able to create archive name as I mentioned.
how do I work it out with --preserve-permissions?
Any help is much appreciated.
... (3 Replies)
Dear all,
I have this archive: cat file.txt
archive test 02 sequence 03 02length 52
archive test 02 sequence 04 02length 52
archive test 02 sequence 05 02length 52
teste arquivo 06 sequencia 08 06 length 54
teste arquivo 06 sequencia 09 ... (8 Replies)
Hi there,
I have one huge archive (it's a system image).
I need sometime to create smaller archives with only one or two file from my big archive.
So I'm looking for a command that extracts files from an archive and pipe them to another one.
I tried the following :
tar -xzOf oldarchive.tgz... (5 Replies)
Hello Admins,
I am facing an issue with ustar tar archive on solaris 10.
By mistake I have created ustar tar archive of /var/adm/messages file on solaris10.
I am trying to untar the /var/adm/messages file . but I am not getting the original text messages file.
I user tar -xvf ... (4 Replies)
I'm looking to archive a client directory from a CIFS share
There are multiple directories that will be stored in a text file and I'm looking to
create an individual tar archive of each folder in the directory.
I've tried a number of commands to no avail.
Here's what I would like.
... (2 Replies)
I' writing a script trying to archive the oldest two directories from one place, tar them, and move them to another.
#!/bin/bash
cd (/dir/with/dirforarchiving)
ARCHIVE=(/temp/dir/)
FIND=$(find . -maxdepth 1 -type d)
ARRAY=(`ls ${FIND} -ltd | tail -2`)
names=(${ARRAY} ${ARRAY})... (4 Replies)