07-31-2008
I have fround a way around this
I just experienced this issue.
By adding an m to my options I got past this.
This only occurred for me when overwriting files by extracting the tarball. The -m (or m) option tells tar not to 'touch' the files and there by not calling utime to update the timestamp.
hth
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to do a bakcup for some files, in the same tape but in diferente time....
at 9am i need the file /public/test1.txt then...
tar -cvf /dev/st0 /public/test1.txt
at 12pm i need the file /public/test2.txt the....
tar ¿? /public/test2.txt
in this point i have problem beacuse when... (3 Replies)
Discussion started by: sokobans
3 Replies
2. UNIX for Advanced & Expert Users
hi ,
On AIX 4.3.3
I typed the following command
tar -cvf <filename> ( actually I forgot to type the device name)
the output was change in the file size to 10240 bytes
I tried tar -xvf to extract the same but file size is same.
The file was "txt" file and was readable before the... (2 Replies)
Discussion started by: amit
2 Replies
3. UNIX for Advanced & Expert Users
Can someone please verify for me if tar compresses the directory or filesystem it is asked to back up??
reason am asking is I checked the size of the /home directory before running a tar command
now, after I ran the tar command and the tar was done extracting the directory from the archive, I... (2 Replies)
Discussion started by: TRUEST
2 Replies
4. UNIX for Advanced & Expert Users
I am using a tar command to backup my system. It works properly.
I have had some trouble and I need to restore a few files.
I am using the following command :
tar xvf /dev/rmt2h myfile_to_restore
The tar command seemd to work but after a long time I got the following error message :... (6 Replies)
Discussion started by: renard
6 Replies
5. Shell Programming and Scripting
The below tar command works fine for me,
tar -cvf - `find ./srcdir -type d` | (cd ./destdir ; tar -xvf - )
but this version is giving error to me:
cd ./srcdir &&
tar -cf - . |
gzip -9 |
cd ../destdir &&
gzip -d |
tar -xf -
error is: gzip: compressed data not read from a terminal.... (2 Replies)
Discussion started by: royalibrahim
2 Replies
6. UNIX for Dummies Questions & Answers
I've done a tar -cvf data.tar *
in our live data directory on a Solaris machine.
I copy the tar file to the test area and try
tar -xvf data.tar .
and it uses the full path in the tar file and overwrites the live ones again.
I've used tar many a time and don't understand why its happening.... (1 Reply)
Discussion started by: kinhell
1 Replies
7. Shell Programming and Scripting
i have some 685 files in my directory.Below the count:
find . -name "CurrentCollectorMeterReadBackup_2009*" -exec ls -ltr {} \; | wc -l
685
i want to tar them but it is telling me arg list too long. how to tar all this files in one shot
tar -cvf - -L... (1 Reply)
Discussion started by: ali560045
1 Replies
8. UNIX for Dummies Questions & Answers
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
9. Linux
can someone help me here. apparently, the colon i included in the name of this file is making it difficult for tar to untar it. please help
####### tar xvf DailyConfigs_Nov-19-11\:00-2009.tar
rsh: DailyConfigs_Nov-19-11: Name or service not known
tar: DailyConfigs_Nov-19-11\:00-2009.tar:... (4 Replies)
Discussion started by: SkySmart
4 Replies
10. Shell Programming and Scripting
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)
Discussion started by: bashnewbee
1 Replies
tar(n) Tar file handling tar(n)
__________________________________________________________________________________________________________________________________________________
NAME
tar - Tar file creation, extraction & manipulation
SYNOPSIS
package require Tcl 8.4
package require tar ?0.4?
::tar::contents tarball
::tar::stat tarball ?file?
::tar::untar tarball args
::tar::get tarball fileName
::tar::create tarball files args
::tar::add tarball files args
::tar::remove tarball files
_________________________________________________________________
DESCRIPTION
::tar::contents tarball
Returns a list of the files contained in tarball. The order is not sorted and depends on the order files were stored in the archive.
::tar::stat tarball ?file?
Returns a nested dict containing information on the named ?file? in tarball, or all files if none is specified. The top level are
pairs of filename and info. The info is a dict with the keys "mode uid gid size mtime type linkname uname gname devmajor devminor
% ::tar::stat tarball.tar
foo.jpg {mode 0644 uid 1000 gid 0 size 7580 mtime 811903867 type file linkname {} uname user gname wheel devmajor 0 devminor 0}
::tar::untar tarball args
Extracts tarball. -file and -glob limit the extraction to files which exactly match or pattern match the given argument. No error is
thrown if no files match. Returns a list of filenames extracted and the file size. The size will be null for non regular files.
Leading path seperators are stripped so paths will always be relative.
-dir dirName
Directory to extract to. Uses pwd if none is specified
-file fileName
Only extract the file with this name. The name is matched against the complete path stored in the archive including directo-
ries.
-glob pattern
Only extract files patching this glob style pattern. The pattern is matched against the complete path stored in the archive.
-nooverwrite
Dont overwrite files that already exist
-nomtime
Leave the file modification time as the current time instead of setting it to the value in the archive.
-noperms
In Unix, leave the file permissions as the current umask instead of setting them to the values in the archive.
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts "Extracted $file ($size bytes)"
}
::tar::get tarball fileName
Returns the contents of fileName from the tarball
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
::tar::create tarball files args
Creates a new tar file containing the files. files must be specified as a single argument which is a proper list of filenames.
-dereference
Normally create will store links as an actual link pointing at a file that may or may not exist in the archive. Specifying
this option will cause the actual file point to by the link to be stored instead.
% ::tar::create new.tar [glob -nocomplain file*]
% ::tar::contents new.tar
file1 file2 file3
::tar::add tarball files args
Appends files to the end of the existing tarball. files must be specified as a single argument which is a proper list of filenames.
-dereference
Normally add will store links as an actual link pointing at a file that may or may not exist in the archive. Specifying this
option will cause the actual file point to by the link to be stored instead.
::tar::remove tarball files
Removes files from the tarball. No error will result if the file does not exist in the tarball. Directory write permission and free
disk space equivalent to at least the size of the tarball will be needed.
% ::tar::remove new.tar {file2 file3}
% ::tar::contents new.tar
file3
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category tar of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
archive, tape archive, tar
tar 0.4 tar(n)