08-16-2009
Many unixes won't accept "-" in a parameter to "tar".
Never assume anything. (Tongue firmly in cheek).
Last edited by methyl; 08-16-2009 at 04:11 PM..
Reason: Clarified by removing clarification
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a tar archive full of compressed .Z (compressed with the compress command) files. I have restored the tar to a disk but am looking for a way to uncompress every file in every sub-directory. Under normal circumstances, I would just change directories and "uncompress *" but with 1600... (3 Replies)
Discussion started by: Kun2112
3 Replies
2. UNIX for Advanced & Expert Users
Hi, I would modify to delete the files after creating the tar archive.
How I can modify the following command:
tar -cvvf logswitch.tar `find *.log* -mtime +5`
It create a tar with files that are older than 5 days. (5 Replies)
Discussion started by: Minguccio75
5 Replies
3. UNIX for Dummies Questions & Answers
how can I find out what is the difference between two tar.gz files without uncompressing them.
thank you. (7 Replies)
Discussion started by: rakeshou
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to create recursive tar archive, while I put there only files of type a*.txt.
Without file filtering the command is: tar cfzf test.tar.gz test_tar/
How I include the switch for including only files with pattern a*.txt ?
Thanks a lot! (1 Reply)
Discussion started by: john.gelburg
1 Replies
5. UNIX and Linux Applications
Is it possible to update a file in a compressed archive.tgz using the tar app without uncompressing/extracting, update and compressing/creating ?
tar -uvzf archive.tgz ./file.txt
tar: Cannot update compressed archives
Try `tar --help' for more information. (1 Reply)
Discussion started by: brendan76
1 Replies
6. UNIX for Dummies Questions & Answers
Hi
I have used the below steps and found some discrepancies
step 1 :
find ./ -type f -mtime +7 -name "*.00*" | wc -l = 13519 ( total files )
( the size of this files is appx : 10GB )
step 2:
find ./ -type f -mtime +7 -name "*.00*" | xargs tar zcvf Archieve_7.tar.gz
step... (7 Replies)
Discussion started by: rakeshkumar
7 Replies
7. Shell Programming and Scripting
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies
8. UNIX for Dummies Questions & Answers
I am not able to extract/remove files older than 1000 days from a tar archive in linux system.
#!/usr/bin/perl
@file_list = `find /home/x/tmp/ -name *xxMsg* -ctime +7`;
$file_name = '/home/x/tmp/new_archive.tar';
for... (1 Reply)
Discussion started by: DannyV
1 Replies
9. UNIX for Dummies Questions & Answers
I cant seem to work out how to count the number of executable files in a particular tar archive? Only in a directory as a whole.
I also cant work out how to count number of certain file types in a tar archive. Only the directory, pretty stuck :( (9 Replies)
Discussion started by: Razor147
9 Replies
10. UNIX for Advanced & Expert Users
How to download in bulky compressed (zip, 7z, bzip, xz, etc) archive files from a repository automatically by use of wget ? (3 Replies)
Discussion started by: abdulbadii
3 Replies
LEARN ABOUT FREEBSD
archive_write_add_filter_xz
ARCHIVE_WRITE_FILTER(3) BSD Library Functions Manual ARCHIVE_WRITE_FILTER(3)
NAME
archive_write_add_filter_bzip2, archive_write_add_filter_compress, archive_write_add_filter_gzip, archive_write_add_filter_lzip,
archive_write_add_filter_lzma, archive_write_add_filter_none, archive_write_add_filter_program, archive_write_add_filter_xz
LIBRARY
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS
#include <archive.h>
int
archive_write_add_filter_bzip2(struct archive *);
int
archive_write_add_filter_compress(struct archive *);
int
archive_write_add_filter_gzip(struct archive *);
int
archive_write_add_filter_lzip(struct archive *);
int
archive_write_add_filter_lzma(struct archive *);
int
archive_write_add_filter_none(struct archive *);
int
archive_write_add_filter_program(struct archive *, const char * cmd);
int
archive_write_add_filter_xz(struct archive *);
DESCRIPTION
archive_write_add_filter_bzip2(), archive_write_add_filter_compress(), archive_write_add_filter_gzip(), archive_write_add_filter_lzip(),
archive_write_add_filter_lzma(), archive_write_add_filter_xz(),
The resulting archive will be compressed as specified. Note that the compressed output is always properly blocked.
archive_write_add_filter_none()
This is never necessary. It is provided only for backwards compatibility.
archive_write_add_filter_program()
The archive will be fed into the specified compression program. The output of that program is blocked and written to the client
write callbacks.
RETURN VALUES
These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.
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_write(3), archive_write_format(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5)
BSD
February 2, 2012 BSD