Sponsored Content
Full Discussion: Extracting from a tar file
Special Forums UNIX Desktop Questions & Answers Extracting from a tar file Post 302177653 by nmalencia on Saturday 22nd of March 2008 06:30:33 AM
Old 03-22-2008
Extracting from a tar file

Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory?

For example the archive files may have a filename of
/SrcFiles/XXX/filename.dat
and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was created on another server, the /SrcFiles/YYY directory does not exist on the server I want to extract it to.

I understand I could create this directory temporarily on the target server, but there are reasons why I can not do that. Do I have any other options?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting from a tar file

Dear experts I have received a tar file containing several files with full path. Now I need to restore it in another system but when I want to extract files by using tar -xvf tarfile it wants to create all files with full paths again in new system in which I don't have enough previleges. How... (4 Replies)
Discussion started by: Reza Nazarian
4 Replies

2. UNIX for Dummies Questions & Answers

Extracting from a tar archive file

Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory? For example the archive files may have a filename of /SrcFiles/XXX/filename.dat and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)
Discussion started by: nmalencia
1 Replies

3. Shell Programming and Scripting

How to read the content of the particular file from tar.Z without extracting?

Hi All, I want to read the content of the particular file from tar.Z without extracting. aaa.tar.Z contains a file called one.txt, I want to read the content of the one.txt without extracting. Please help me to read the content of it. Regards, Kalai. (12 Replies)
Discussion started by: kalpeer
12 Replies

4. Solaris

option to delete .tar file while extracting

Is there an option in tar which deletes the .tar file as soon as it is successfully extracted. (5 Replies)
Discussion started by: vickylife
5 Replies

5. Solaris

Extracting file from tar at relative location!!

Hi Gurus, I have a .tar file which required untar to the new location. I list the content with –tvf its listing the files which are inside the tar, when I am extracting he file from tar its working fine, however once I am trying to extract the file at the new location I am unable to do so. I... (11 Replies)
Discussion started by: kumarmani
11 Replies

6. UNIX for Dummies Questions & Answers

Extracting specific files from a tar file in HP-UX

I have tried: tar -xfv mytarfile.tar archive/tabv/* tar -xfv mytarfile.tar --wildcards 'archive/tabv/*' tar -xf mytarfile.tar -v --wildcards 'archive/tabv/*' tar -xfv mytarfile.tar --wildcards --no-anchored 'archive/tabv/*' tar -xfv mytarfile.tar --wildcards `archive/tabv/*` and none... (5 Replies)
Discussion started by: zapper222
5 Replies

7. Solaris

exclude absolute paths when extracting Tar file?

Hi, How do I extract data from TAR excluding absolute paths for Tar? (Solaris) Thanks (3 Replies)
Discussion started by: zam
3 Replies

8. UNIX for Advanced & Expert Users

Issue in extracting Tar and Zipped file.

Hi, I want to tar files and zip them in order to clean up space in directory. I have files like /path/file1 /path file2. What I am trying to do is: Option 1: tar -cvf /path/file1 /path file2 | gzip > test.tar.gz I got the file created. But while trying to extract the Tar and zipped file, I... (1 Reply)
Discussion started by: Quesemail
1 Replies

9. Shell Programming and Scripting

Problem extracting zipped tar file

I was extracting the zipped tar file with the command gzip -dc Sample.tar.gz |tar xf - The tar file contained many delimited files; but lately they changed the structure of the tar file with another folder. So now all the delimited files are inside a folder called "Folder1" and the folder... (6 Replies)
Discussion started by: asandy1234
6 Replies

10. OS X (Apple)

Uncompressing but not extracting tar.Z file

Hi I have a few hundred files with extension .tar.Z. These files were archived (tar) and compressed (Z) on a UNIX system. I need to unzip them but not extract them. In other words they need to go to .tar extension. I would like to do this on my MAC or on a windows pc. I do not have a UNIX... (3 Replies)
Discussion started by: kalbano
3 Replies
bup-meta(1)						      General Commands Manual						       bup-meta(1)

NAME
bup-meta - create or extract a metadata archive SYNOPSIS
bup meta --create [-R] [-v] [-q] [--no-symlinks] [--no-paths] [-f file] <paths...> bup meta --list [-v] [-q] [-f file] bup meta --extract [-v] [-q] [--numeric-ids] [--no-symlinks] [-f file] bup meta --start-extract [-v] [-q] [--numeric-ids] [--no-symlinks] [-f file] bup meta --finish-extract [-v] [-q] [--numeric-ids] [-f file] DESCRIPTION
bup meta either creates or extracts a metadata archive. A metadata archive contains the metadata information (timestamps, ownership, access permissions, etc.) for a set of filesystem paths. OPTIONS
-c, --create Create a metadata archive for the specified paths. Write the archive to standard output unless --file is specified. -t, --list Display information about the metadata in an archive. Read the archive from standard output unless --file is specified. -x, --extract Extract a metadata archive. Conceptually, perform --start-extract followed by --finish-extract. Read the archive from standard input unless --file is specified. --start-extract Build a filesystem tree matching the paths stored in a metadata archive. By itself, this command does not produce a full restora- tion of the metadata. For a full restoration, this command must be followed by a call to --finish-extract. Once this command has finished, all of the normal files described by the metadata will exist and be empty. Restoring the data in those files, and then calling --finish-extract should restore the original tree. The archive will be read from standard input unless --file is specified. --finish-extract Finish applying the metadata stored in an archive to the filesystem. Normally, this command should follow a call to --start- extract. The archive will be read from standard input unless --file is specified. -f, --file=filename Read the metadata archive from filename or write it to filename as appropriate. If filename is "-", then read from standard input or write to standard output. -R, --recurse Recursively descend into subdirectories during --create. --numeric-ids Apply numeric user and group IDs (rather than text IDs) during --extract or --finish-extract. --symlinks Record symbolic link targets when creating an archive, or restore symbolic links when extracting an archive (during --extract or --start-extract). This option is enabled by default. Specify --no-symlinks to disable it. --paths Record pathnames when creating an archive. This option is enabled by default. Specify --no-paths to disable it. -v, --verbose Be more verbose (can be used more than once). -q, --quiet Be quiet. EXAMPLES
# Create a metadata archive for /etc. $ bup meta -cRf etc.meta /etc bup: removing leading "/" from "/etc" # Extract the etc.meta archive (files will be empty). $ mkdir tmp && cd tmp $ bup meta -xf ../etc.meta $ ls etc # Restore /etc completely. $ mkdir tmp && cd tmp $ bup meta --start-extract -f ../etc.meta ...fill in all regular file contents using some other tool... $ bup meta --finish-extract -f ../etc.meta BUGS
Hard links are not handled yet. BUP
Part of the bup(1) suite. AUTHORS
Rob Browning <rlb@defaultvalue.org>. Bup unknown- bup-meta(1)
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy