Sponsored Content
Full Discussion: unzip .tgz files
Top Forums UNIX for Dummies Questions & Answers unzip .tgz files Post 15051 by DanielB on Saturday 9th of February 2002 04:11:28 AM
Old 02-09-2002
tgz files are gzip compressed tar archives. You can extract them like this : tar xzf filename
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unzip particular gzip files among the normal data files

Hello experts, I run Solaris 9. I have a below script which is used for gunzip the thousand files from a directory. ---- #!/usr/bin/sh cd /home/thousands/gzipfiles/ for i in `ls -1` do gunzip -c $i > /path/to/file/$i done ---- In my SAME directory there thousand of GZIP file and also... (4 Replies)
Discussion started by: thepurple
4 Replies

2. UNIX for Dummies Questions & Answers

Create individual tgz files from a set of files

Hello I have a ton of files in a directory of the format app.log.2008-04-04 I'd like to run a command that would archive each of these files as app.log.2008-04-04.tgz I tried a few combinations of find with xargs etc but no luck. Thanks Amit (4 Replies)
Discussion started by: amitg
4 Replies

3. UNIX for Dummies Questions & Answers

Extract .tgz files that only contain a pattern

Let's say I've got File.tgz that contains:- Apple.txt Banana.txt Carrot.txt AppleBanana.txt Now, I would like to only extract files that contain the patter "Apple". I've tried this tar -xvf File.tgz 'tar -tf File.tgz | grep 'Apple'' but it does not work. Please help. Thanks. (12 Replies)
Discussion started by: percivalwcy
12 Replies

4. UNIX for Dummies Questions & Answers

file.tgz.1of2 & file.tgz.2of2

Hi all, Need help. Anybody seen this kind of file before? file.tgz.1of2 file.tgz.2of2 how to extract this tgz file? Any help? Tq (5 Replies)
Discussion started by: zeedwolf
5 Replies

5. Shell Programming and Scripting

How to Unzip a .ZIP file in Unix without using unzip cmd..?????

Hi All I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX). I don't have unzip cmd available in my curent Unix version Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file . Please elaborate on the commands aval and... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

6. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

7. Shell Programming and Scripting

How to move files to existing .tgz file?

Hi, I have already created the tar files. which consist of some log files and Audit.csv plz see the below code for that ================================================ tar -Pczf ARCH/${arc_date}.tgz $LOG/*.log $REYE/CEP/FiAdapter/Audit.${arc_date}.csv ... (3 Replies)
Discussion started by: pspriyanka
3 Replies

8. Shell Programming and Scripting

Script to unzip files and Rename the Output-files

Hi all, I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
Discussion started by: pmkenya
2 Replies

9. Shell Programming and Scripting

Extracting specific files from multiple .tgz files

Hey, I have number of .tgz files and want to extract the file with the ending *results.txt from each one. I have tried for file in *.tgz; do tar --wildcards -zxf $file *results.txt; doneas well as list=$(ls *.tgz) for i in $list; do tar --wildcards -zxvf $i *.results.txt; done... (1 Reply)
Discussion started by: jfern
1 Replies

10. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
PKG_ADMIN(1)						    BSD General Commands Manual 					      PKG_ADMIN(1)

NAME
pkg_admin -- perform various administrative tasks to the pkg system SYNOPSIS
pkg_admin [-bqSVv] [-C config] [-d lsdir] [-K pkg_dbdir] [-s sfx_pattern] command [args ...] DESCRIPTION
This command performs various administrative tasks around the NetBSD Packages System. OPTIONS
The following command-line options are supported: -b Print only the base names when matching package names for lsall and lsbest. -C config Read the configuration file from config instead of the system default. -d lsdir Set lsdir as the path to the directory in which to find matching package names for lsall and lsbest. -K pkg_dbdir Override the value of the PKG_DBDIR configuration option with the value pkg_dbdir. -q Perform checks in a quiet manner. In normal operation, pkg_admin prints a '.' to standard output to indicate progress. This option suppresses this progress indicator. -S Set the shell glob pattern for package suffixes when matching package names for lsall and lsbest to be the null suffix. -s sfx_pattern Set the shell glob pattern for package suffixes when matching package names for lsall and lsbest. The default pattern is ".t[bg]z". -V Print version number and exit. -v Be more verbose. The following commands are supported: add pkg ... For each listed package, write the absolute pathnames of the files listed in its +CONTENTS file together with the package they belong to into the package database. This should be used only by pkg_view(1). audit [-es] [-t type] [pkg] ... Check the listed installed packages for vulnerabilities. If no package is given, check all installed packages. If -e is given, override the CHECK_END_OF_LIFE option from pkg_install.conf(5) with "yes". If -s is given, check the signature of the pkg-vulnera- bilities file before using it. -t restricts the reported vulnerabilities to type type. audit-pkg [-es] [-t type] [pkg] ... Like audit, but check only the given package names or patterns. audit-batch [-es] [-t type] [pkg-list] ... Like audit-pkg, but read the package names or patterns one per line from the given files. audit-history [-s] [-t type] [pkgbase] ... Print all vulnerabilities for the given base package names. check [pkg ...] Use this command to check the files belonging to some or all of the packages installed on the local machine against the checksum which was recorded in the +CONTENTS files at package installation time. Symbolic links also have their integrity checked against the recorded value at package installation time. If no additional argument is given, the files of all installed packages are checked, else only the named packages will be checked (wildcards can be used here, see pkg_info(1)). The packages' +CONTENTS files will be parsed and the checksum will be checked for every file found. A warning message is printed if the expected checksum differs from the checksum of the file on disk. Symbolic links are also checked, ensuring that the targets on disk are the same as the contents recorded at package installation time. check-license condition Check if condition can be fulfilled with the currently set of accepted licenses. Prints either yes or no to stdout if the condition can be parsed, otherwise it exits with error. check-pkg-vulnerabilities [-s] file Check format and hashes in the pkg-vulnerabilities file file. If -s is given, also check the embedded signature. check-signature file ... Reports if file is a correctly signed package. check-single-license license Check if license is a valid license name and if it is in the set of acceptable licenses. Prints either yes or no to stdout if the condition can be parsed, otherwise it exits with error. config-var variable Print the current value of variable as used after parsing the configuration file. delete pkg ... For each listed package, remove all file entries in the package database that belong to the package. This should be used only by pkg_view(1). dump Dump the contents of the package database, similar to pkg_info -F. Columns are printed for the key field used in the pkgdb - the filename -, and the data field - the package the file belongs to. fetch-pkg-vulnerabilities [-su] Fetch a new pkg-vulnerabilities file, check the format and if -s is given the signature. If all checks are passed, write it to pkgdb. If -u is given, the fetch is conditional and the file transfer is only done if the remote version is newer than the one in pkgdb. findbest pattern ... Search the entries of PKG_PATH for packages matching pattern. Print the URL of the best matching package to stdout for each pattern. If a pattern is not matched, it is skipped and the command will return a failure. lsall /dir/pkgpattern lsbest /dir/pkgpattern List all/best package matching pattern in the given directory /dir. If the -d flag is given, then that directory path overrides /dir. Can be used to work around limitations of /bin/sh and other filename globbing mechanisms. This option implements matching of pkg-wildcards against arbitrary files and directories, useful mainly in the build system itself. See pkg_info(1) for a description of the pattern. Example: yui# cd /usr/pkgsrc/packages/i386ELF/All/ yui# ls unzip* unzip-5.40.tgz unzip-5.41.tgz yui# pkg_admin lsall 'unzip*' /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz yui# pkg_admin lsall 'unzip>=5.40' /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz yui# pkg_admin lsall 'unzip>=5.41' /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz yui# pkg_admin lsbest 'unzip>=5.40' /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*' /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz /usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz pmatch pattern pkg Returns true if pkg matches pattern, otherwise returns false. rebuild Rebuild the package database mapping from scratch. This option is only intended for recovery after system crashes during package installation and removal. rebuild-tree Rebuild the +REQUIRED_BY files from scratch by reresolving all dependencies. This option is intended to be used for fixing inconsistencies between the records of depending and depended-on packages, such as can arise by the use of pkg_delete -f. set variable=value pkg ... Set variable with information about the installed package. Use unset to remove a variable. Packages that are not installed directly by the user but pulled in as dependencies are marked by setting ``automatic=YES''. gpg-sign-package pkg spkg Sign the binary package pkg using GPG and write the result to spkg. x509-sign-package pkg spkg key cert Sign the binary package pkg using the key key and the certificate cert, using spkg as output file. unset variable pkg ... Remove an installation variable. ENVIRONMENT
See pkg_install.conf(5) for options, that can also be specified using the environment. FILES
/var/db/pkg/pkgdb.byfile.db /var/db/pkg/<pkg>/+CONTENTS SEE ALSO
pkg_add(1), pkg_create(1), pkg_delete(1), pkg_info(1), pkg_view(1), pkg_install.conf(5), pkgsrc(7) HISTORY
The pkg_admin command first appeared in NetBSD 1.4. AUTHORS
The pkg_admin command was written by Hubert Feyrer. BSD
June 16, 2010 BSD
All times are GMT -4. The time now is 08:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy