Sponsored Content
Top Forums UNIX for Dummies Questions & Answers redirecting tar extract to another directory Post 33916 by WIntellect on Friday 24th of January 2003 04:41:37 AM
Old 01-24-2003
If you use the following command:
Code:
# tar tvzf <filename.tar.gz>

You should be told the location each file will be un-tared to. If each line has a leading "/" then that will be an exact location on your system.

If each line does not begin with a "/" then the archive is "relative" and will un-tar relative to your location!

Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

extract a sub directory form a tar file

anyone know if it is possable to extract a subdirectory in a tar file. IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. (2 Replies)
Discussion started by: Optimus_P
2 Replies

2. UNIX for Dummies Questions & Answers

extract tar files without creating directory

I received a tar file of a directory with 50,000 files in it. Is it possible to extract the files in the tar file without first creating the directory? ie. Doing tar -xvf filename.tar extracts as follows: x directory/file1.txt x directory/file2.txt . . . I would like to avoid... (4 Replies)
Discussion started by: here2learn
4 Replies

3. UNIX for Advanced & Expert Users

tar extract to different directory

Hi, I created a tar file of a directory dir1 from /tmp in the following way $pwd /tmp $tar -cvf dir1.tar dir1 (dir1 will have say file1) Now i want to extract it in the directory /tmp/dir2 so that the directory dir1 is also created and extracted... (1 Reply)
Discussion started by: ammu
1 Replies

4. Shell Programming and Scripting

tar command dont tar to original directory

HI, if I have a tarfile called pmapdata.tar that contains tar -tvf pmapdata.tar -rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt -rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt -rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies

5. Shell Programming and Scripting

Extract files from tar ball without directory structure

Hi, I have tar filw which has multiple directories which contain files. When i extract using tar -xf the directory structure also get extracted. I require only files and not directory structures as there will be overhead of moving the files again. So i searched here and got a solution but... (4 Replies)
Discussion started by: chetan.c
4 Replies

6. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies

7. Solaris

HOW TO extract.tar file to specific directory..?

Hi all, In Solaris howto extract tar file to specific folder. This is what we do in Linux, but how to do the same thing in Solaris ? -tar -xzvf /tmp/etc.tar.bz -C /tmp (Will extract in /tmp dir) 3.gzip COMPRESSION AND EXTRACTION -tar -czvf /tmp/etc.tar.bz /etc -du ... (5 Replies)
Discussion started by: manalisharmabe
5 Replies

8. Shell Programming and Scripting

Extract a single file from a tar file to another directory

Hi, I need to extract a single file from a tar file to another directory. So far I have this: This one extract a single file to same directory: tar -xvf filename.tar ./file.txt I tried this but its not working tar -xvf filename.tar /home/dir ./file.txt or this: (6 Replies)
Discussion started by: erin00
6 Replies

9. Shell Programming and Scripting

Extract tar archive on remote server in another directory

HI Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything working fine: $( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' ) but i have to ... (1 Reply)
Discussion started by: BACya
1 Replies

10. UNIX for Dummies Questions & Answers

Extract tar archive on remote server in another directory

HI All Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything is working fine: $( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' ) but when im... (9 Replies)
Discussion started by: BACya
9 Replies
UUPDATE(1)                                                    General Commands Manual                                                   UUPDATE(1)

NAME
uupdate - upgrade a source code package from an upstream revision SYNOPSIS
uupdate [options] new_upstream_archive [version] uupdate [options] --patch|-p patch_file DESCRIPTION
uupdate modifies an existing Debian source code archive to reflect an upstream update supplied as a patch or from a wholly new source code archive. The utility needs to be invoked from the top directory of the old source code directory, and if a relative name is given for the new archive or patch file, it will be looked for first relative to the execution directory and then relative to the parent of the source tree. (For example, if the changelog file is /usr/local/src/foo/foo-1.1/debian/changelog, then the archive or patch file will be looked for relative to /usr/local/src/foo.) Note that the patch file or archive cannot be within the source tree itself. The full details of what the code does are given below. Currently supported source code file types are .tar.gz, .tar.bz2, .tar.Z, .tgz, .tar, .tar.lzma, .tar.xz, .7z and .zip archives. Also sup- ported are already unpacked source code archives; simply give the path of the source code directory. Supported patch file types are gzip- compressed, bzip2-compressed, lzma-compressed, xz-compressed and uncompressed patch files. The file types are identified by the file names, so they must use the standard suffixes. Usually uupdate will be able to deduce the version number from the source archive name (as long as it only contains digits and periods). If that fails, you need to specify the version number explicitly (without the Debian release number which will always be initially "1", or "0ubuntu1" on Ubuntu-detected systems). This can be done with an initial --upstream-version or -v option, or in the case of an archive, with a version number after the filename. (The reason for the latter is so that uupdate can be called directly from uscan.) Since uupdate uses debuild to clean the current archive before trying to apply a patch file, it accepts a --rootcmd or -r option allowing the user to specify a gain-root command to be used. The default is to use fakeroot. If an archive is being built, the pristine upstream source should be used to create the .orig.tar.gz file wherever possible. This means that MD5 sums or other similar methods can be used to easily compare the upstream source to Debian's copy of the upstream version. This is the default behaviour, and can be switched off using the --no-pristine option below. OPTIONS
This is a summary of what was explained above. --upstream-version version, -v version Specify the version number of the upstream package explicitly. --rootcmd gain-root-command, -r gain-root-command Specify the command to be used to become root to build the package and is passed onto debuild(1) if it is specified. --pristine, -u Treat the source as pristine upstream source and symlink to it from <package>_<version>.orig.tar.gz whenever possible. This option has no meaning for patches. This is the default behaviour. --no-pristine Do not attempt to make a <package>_<version>.orig.tar.gz symlink. --symlink, -s Simply create a symlink when moving a new upstream .tar.gz archive to the new <package>_<version>.orig.tar.gz location. This is the default behaviour. --no-symlink Copy the upstream .tar.gz to the new location instead of making a symlink. --no-conf, --noconf Do not read any configuration files. This can only be used as the first option given on the command-line. --help, -h Display a help message and exit successfully. --version Display version and copyright information and exit successfully. CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. Command line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently recognised variables are: UUPDATE_PRISTINE If this is set to no, then it is the same as the --no-pristine command line parameter being used. UUPDATE_SYMLINK_ORIG If this is set to no, then it is the same as the --no-symlink command line parameter being used. UUPDATE_ROOTCMD This is equivalent to the --rootcmd option. ACTIONS TAKEN ON AN ARCHIVE
Figure out new version number Unless an explicit version number is provided, the archive name is analyzed for a sequence of digits separated by dots. If some- thing like that is found, it is taken to be the new upstream version number. If not, processing is aborted. Create the .orig.tar.gz archive If the --pristine or -u option is specified and the upstream archive is a .tar.gz or .tgz archive, then this will be copied directly to <package>_<version>.orig.tar.gz. Unpacking The archive is unpacked and placed in a directory with the correct name according to Debian policy: package-upstream_version.orig. Processing is aborted if this directory already exists. Patching The .diffs.gz from the current version are applied to the unpackaged archive. A non-zero exit status and warning message will occur if the patches did not apply cleanly or if no patch file was found. Also, the list of rejected patches will be shown. The file debian/rules is made executable and all of the .orig files created by patch are deleted. Changelog update A changelog entry with the new version number is generated with the text "New upstream release". When used on Ubuntu systems, dpkg-vendor detection is used to set the Debian revision to "0ubuntu1". You may change debian/changelog manually afterwards. ACTIONS TAKEN ON A PATCH FILE
Figure out new version number Unless an explicit version number is provided, the patch file name is analyzed for a sequence of digits separated by dots. If some- thing like that is found, it is taken to be the new upstream version number. If not, processing is aborted. Clean the current source tree The command debuild clean is executed within the current Debian source archive to clean it. If a -r option is given to uupdate, it is passed on to debuild. Patching The current source archive (.orig.tar.gz) is unpacked and the patch applied to the original sources. If this is successful, then the .orig directory is renamed to reflect the new version number and the current Debian source directory is copied to a directory with the new version number, otherwise processing is aborted. The patch is then applied to the new copy of the Debian source direc- tory. The file debian/rules is made executable and all of the .orig files created by patch are deleted. If there was a problem with the patching, a warning is issued and the program will eventually exit with non-zero exit status. Changelog update A changelog entry with the new version number is generated with the text "New upstream release". When used on Ubuntu systems, dpkg-vendor detection is used to set the Debian revision to "0ubuntu1". You may change debian/changelog manually afterwards. SEE ALSO
debuild(1), fakeroot(1), patch(1), The Debian Policy Manual and devscripts.conf(5). AUTHOR
The original version of uupdate was written by Christoph Lameter <clameter@debian.org>. Several changes and improvements have been made by Julian Gilbey <jdg@debian.org>. DEBIAN Debian Utilities UUPDATE(1)
All times are GMT -4. The time now is 08:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy