Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Files count mismatch when used with Tar with find Post 302578131 by rakeshkumar on Thursday 1st of December 2011 01:10:29 AM
Old 12-01-2011
thanks all ,

Code:
find ./ -type f -mtime +7 -name "*.00*" | tar -zcv -f Archieve_7.tar.gz -T -
works for me !!!

are there any other tools which are used for archiving in linux apart from TAR? because i see if tar is been interrupted while processing then that resultant archive is unusable so is there any way to avoid this or any other tools better than "tar "

thanks alot for you support !! Smilie

---------- Post updated at 01:10 AM ---------- Previous update was at 12:48 AM ----------

i have observed that slight change in memory usage

after tar , i have checked usage after extracting the tar.gz and its (du folder) :11049124

compared it using
Code:
find ./ -type f -mtime +7 -name "*.00*" -exec du  {} \;| awk '{s+=$1} END {print "Total SIZE: " s}'

it gave a total of 11048212

the difference is 912 bytes , so are there any header added ?? could any one explain why ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find a data from several .tar,.gz files

Hi I have a several files with .tar or .gz in a known location. i have files with one of the several files of .tar or .gz text.txt help.pl move.txt how do i write a script to find out those particular files .tar or .gz where that contains the above mentioned files (i.e,... (2 Replies)
Discussion started by: gkrishnag
2 Replies

2. Shell Programming and Scripting

comparing two files and find mismatch

hi i have two files and i want to compare both the files and find out mismatch in 3rd file file1 00354|1|0|1|1|0|0|0|1|2 52424|1|0|1|1|0|0|0|1|2 43236|1|0|1|1|0|0|0|1|2 41404|1|0|1|1|0|0|0|1|2 79968|1|0|1|1|0|0|0|1|2 file2 00354|1|0|1|1|0|0|0|1|2 52424|1|0|1|1|0|0|0|0|2... (9 Replies)
Discussion started by: dodasajan
9 Replies

3. Shell Programming and Scripting

To find String mismatch

Hi, I have a doubt when searching files for the existence of a particular key. I have a property file has data with key and value pair like below and i call it as property file.ini here are the contents in File: popertyfile.ini location.property=2 agent.method=begin newkey=23 ... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies

4. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

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)
Discussion started by: ahSher
2 Replies

5. UNIX for Dummies Questions & Answers

Count number of compressed files in a tar.gz archive

Hi Folks, I have a tar.gz compressed file with me, and I want to know the number of files in the archive without uncompressing it. Please let me know how I can achieve it. Regards RK Veluvali (5 Replies)
Discussion started by: vrk1219
5 Replies

6. Shell Programming and Scripting

find files older than and containing then tar.

I'm tring to: find files recursively older than x days that contain dat or DAT then tar them I can find the files older than 90 days containing dat with this: find . -mtime +90 -type f -name "*dat*" -exec tar -cvvfp /some/path/some.tar {} \; but how do I do it case insensitive? ... (3 Replies)
Discussion started by: Ikon
3 Replies

7. Shell Programming and Scripting

Find *.tar files under all subdirectories

Hi there, I'm new to shell scripting... I've a situation like to find *.tar files under all subdirectories in "/home/abcd" and i used the below, find /opt/lhapp ! -name "temp" | more the above works fine.. Now don't need search few direcotries like "/home/abcd/aaaa",... (15 Replies)
Discussion started by: skcvasanth
15 Replies

8. Shell Programming and Scripting

Count mismatch in UNIX

Hi, I have a requirement like below. client is sending the .txt filles.In that file we have 10 records but when I execute the below command it is showing 9 records. klena20> wc -l sample_file.txt|awk '{print $1}' It is showing the output as 9 But in a file records are 10. I found... (7 Replies)
Discussion started by: kirankumar
7 Replies

9. Shell Programming and Scripting

awk to output match and mismatch with count using specific fields

In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
Discussion started by: cmccabe
7 Replies

10. Shell Programming and Scripting

Find Syllable count mismatch

Hello, I have written a syllable splitter for Pseudo English and Indic. I have a large database with the following structure Syllables in Pseudo English delimited by |=Syllables in Devanagari delimited by | The tool produces syllables in both scripts. An example is given below: ... (2 Replies)
Discussion started by: gimley
2 Replies
tar_extract_all(3)						  C Library Calls						tar_extract_all(3)

NAME
tar_extract_all, tar_extract_glob, tar_append_tree - high-level tar archive manipulation functions SYNOPSIS
#include <libtar.h> int tar_extract_all(TAR *t, char *prefix); int tar_extract_glob(TAR *t, char *globname, char *prefix); int tar_append_tree(TAR *t, char *realdir, char *savedir); VERSION
This man page documents version 1.2 of libtar. DESCRIPTION
The tar_extract_all() function extracts all files from the tar archive associated with the TAR handle t into the path named by the prefix argument. The tar_extract_glob() function extracts all files matching the given glob pattern from the tar archive associated with the TAR handle t into the path named by the prefix argument. The tar_append_tree() function appends all files from the directory tree named by realdir to the tar archive associated with the TAR handle t. The pathnames stored in the tar archive are modified by replacing realdir with savedir, so that the files will be extracted into savedir. RETURN VALUES
On successful completion, these functions will return 0. On failure, they will return -1 and set errno to an appropriate value. ERRORS
These functions will fail under the same conditions that the tar_skip_regfile(), tar_extract_regfile(), opendir(), lstat(), or tar_append_file() functions fail. SEE ALSO
opendir(2), lstat(2), tar_skip_regfile(3), tar_extract_regfile(3), tar_append_file(3) University of Illinois Jan 2001 tar_extract_all(3)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy