04-28-2008
Thanks era, it worked!
JAK
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Folks,
I've created a tar file on tape using:
tar xvf /dev/rmt0
The directory I was in was:
\IMPULS\F50D01\temperik
under temperik the tar command created subdirectories.
I need too BACKUP these subdirectories again and restore them on another machine,
But when i'm going to... (10 Replies)
Discussion started by: Erik Rooijmans
10 Replies
2. UNIX for Dummies Questions & Answers
I created a relative backup of my home directory using tar into a file named backup.tar.
No problem there.
I checked it out using the table of contents command to list the contents of the backup.tar file, and there is no problem there either.
But, when I tried restoring backup.tar into a... (2 Replies)
Discussion started by: Relykk
2 Replies
3. UNIX for Dummies Questions & Answers
Unix is great at giving you power were you need it, but what a pain in the rump when you just want to do such a simple thing like file management. I'm going back to Windows, crashing is frustrating, needing to spend 30 min just to zip a file up is crazy. (3 Replies)
Discussion started by: yankee428
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a simple question. How do I get a tar of all the files under specific directory which are created on some specific date?
Suppose I am in /home/user123/logs. I need the tar of all the logs which are created on May 07. There are some 30 files of that date. Please help.
Thanks. (2 Replies)
Discussion started by: everurs
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
I did this command to tar the files but I got an error.
tar -cvpf filename.tar pathname/
It did tar the file filename.tar but then it gave me this error "Reach end of file before expected". The new tar file is about 2GB. So does that mean my tar file limit is 2GB? Is there a max limit... (4 Replies)
Discussion started by: chaoses
4 Replies
6. 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
7. 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
8. Shell Programming and Scripting
I am writing a perl script to tar multiple files (in unix) from a given directory to a given output directory. I do NOT want the file path included in the tar, so I've flagged the -C option. Example:
tar -cvf tar/1.tar -C htmp/source/ 1-1-1.xml
However, I need to do this for a number of target... (3 Replies)
Discussion started by: michanjohns
3 Replies
9. Shell Programming and Scripting
Hi all, newbie here.
Could anyone help me how to combine a tar -c and tar -x command such that the source file/folder is archived into a target file in the destination folder (may or may not be in the same server), and extracted directly (through pipe?) in that same destination folder?
Thanks... (2 Replies)
Discussion started by: frys_hp
2 Replies
10. Shell Programming and Scripting
I wish my tar -xf hello.tar command should return successful even if the tar has already been extracted at the same location i.e. exists by the same or a different user.
Currently i am getting this error as another user has extracted the same tar at the same location.
tar: README - cannot... (6 Replies)
Discussion started by: mohtashims
6 Replies
TAR(1) General Commands Manual TAR(1)
NAME
tar - archiver
SYNOPSIS
tar key [ file ... ]
DESCRIPTION
Tar saves and restores file trees. It is most often used to transport a tree of files from one system to another. The key is a string
that contains at most one function letter plus optional modifiers. Other arguments to the command are names of files or directories to be
dumped or restored. A directory name implies all the contained files and subdirectories (recursively).
The function is one of the following letters:
c Create a new archive with the given files as contents.
x Extract the named files from the archive. If a file is a directory, the directory is extracted recursively. Modes are restored if
possible. If no file argument is given, extract the entire archive. If the archive contains multiple entries for a file, the lat-
est one wins.
t List all occurrences of each file in the archive, or of all files if there are no file arguments.
r The named files are appended to the archive.
The modifiers are:
v (verbose) Print the name of each file treated preceded by the function letter. With t, give more details about the archive entries.
f Use the next argument as the name of the archive instead of the default standard input (for keys x and t) or standard output (for
keys c and r).
u Use the next (numeric) argument as the user id for files in the output archive. This is only useful when moving files to a non-Plan
9 system.
g Use the next (numeric) argument as the group id for files in the output archive.
EXAMPLES
Tar can be used to copy hierarchies thus:
{cd fromdir; tar c .} | {cd todir; tar x}
SOURCE
/sys/src/cmd/tar.c
SEE ALSO
ar(1), bundle(1), tapefs(1)
BUGS
There is no way to ask for any but the last occurrence of a file.
File path names are limited to 100 characters.
The tar format allows specification of links and symbolic links, concepts foreign to Plan 9: they are ignored.
TAR(1)