Sponsored Content
Full Discussion: unzip .tgz files
Top Forums UNIX for Dummies Questions & Answers unzip .tgz files Post 15071 by TioTony on Saturday 9th of February 2002 06:10:16 PM
Old 02-09-2002
My mistake, I was reading fast and read "xvf" instead of "xzf".
 

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
READ(2) 						     Linux Programmer's Manual							   READ(2)

NAME
read - read from a file descriptor SYNOPSIS
#include <unistd.h> ssize_t read(int fd, void *buf, size_t count); DESCRIPTION
read() attempts to read up to count bytes from file descriptor fd into the buffer starting at buf. If count is zero, read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. RETURN VALUE
On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this number. It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually avail- able right now (maybe because we were close to end-of-file, or because we are reading from a pipe, or from a terminal), or because read() was interrupted by a signal. On error, -1 is returned, and errno is set appropriately. In this case it is left unspecified whether the file position (if any) changes. ERRORS
EAGAIN The file descriptor fd refers to a file other than a socket and has been marked nonblocking (O_NONBLOCK), and the read would block. EAGAIN or EWOULDBLOCK The file descriptor fd refers to a socket and has been marked nonblocking (O_NONBLOCK), and the read would block. POSIX.1-2001 allows either error to be returned for this case, and does not require these constants to have the same value, so a portable appli- cation should check for both possibilities. EBADF fd is not a valid file descriptor or is not open for reading. EFAULT buf is outside your accessible address space. EINTR The call was interrupted by a signal before any data was read; see signal(7). EINVAL fd is attached to an object which is unsuitable for reading; or the file was opened with the O_DIRECT flag, and either the address specified in buf, the value specified in count, or the current file offset is not suitably aligned. EINVAL fd was created via a call to timerfd_create(2) and the wrong size buffer was given to read(); see timerfd_create(2) for further information. EIO I/O error. This will happen for example when the process is in a background process group, tries to read from its controlling tty, and either it is ignoring or blocking SIGTTIN or its process group is orphaned. It may also occur when there is a low-level I/O error while reading from a disk or tape. EISDIR fd refers to a directory. Other errors may occur, depending on the object connected to fd. POSIX allows a read() that is interrupted after reading some data to return -1 (with errno set to EINTR) or to return the number of bytes already read. CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001. NOTES
On NFS file systems, reading small amounts of data will only update the timestamp the first time, subsequent calls may not do so. This is caused by client side attribute caching, because most if not all NFS clients leave st_atime (last file access time) updates to the server and client side reads satisfied from the client's cache will not cause st_atime updates on the server as there are no server side reads. Unix semantics can be obtained by disabling client side attribute caching, but in most situations this will substantially increase server load and decrease performance. Many file systems and disks were considered to be fast enough that the implementation of O_NONBLOCK was deemed unnecessary. So, O_NONBLOCK may not be available on files and/or disks. SEE ALSO
close(2), fcntl(2), ioctl(2), lseek(2), open(2), pread(2), readdir(2), readlink(2), readv(2), select(2), write(2), fread(3) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2009-02-23 READ(2)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy