Sponsored Content
Full Discussion: [zcat] [gunzip -c] header
Top Forums Shell Programming and Scripting [zcat] [gunzip -c] header Post 302807725 by amazigh42 on Wednesday 15th of May 2013 09:17:54 AM
Old 05-15-2013
Hello,

I have to deal with several archives in different servers, it is quite restrictive.
It forces me to decompress and compress the file again because it is an archive directory. Is there a simpler solution with gunzip or remove the header with grep or something ?

Thanks you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

zcat --> Arg list too long

Hi all I have more than 1000 files in a folder and when ever i use a "compress" or "zcat" command it give error /bin/zcat: Arg list too long. . any solution for this :o (3 Replies)
Discussion started by: muneebr
3 Replies

2. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

3. Linux

zcat on Linux

Hi I am trying to extract a <filename>.tar.Z on a SLES machine using zcat. The command I am using is zcat <filename>.tar.Z | tar xf - When I use the above I get the following message tar: Read 7168 bytes from - I think the message is benign because I see that my files where... (2 Replies)
Discussion started by: felixmat1
2 Replies

4. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

5. Shell Programming and Scripting

zcat two files

Hi, Like cat file1 file2 > file Can I do zcat file1.gz file2.gz > file.gz (11 Replies)
Discussion started by: jacobs.smith
11 Replies

6. Shell Programming and Scripting

BASH ZCAT EGREP Shell Script

I created a backup script that emails all the admins when the backup is complete and attaches a log file of what what backed up. On occasion, something happens in which the backups stop working, I started "grep"ing around /var/log/syslog and I usually find the smoking gun. My goal is to zcat... (8 Replies)
Discussion started by: metallica1973
8 Replies

7. UNIX for Dummies Questions & Answers

How zcat works?

Hi, just i would like to know, how will be the response if you try to read a 40GB compressed file using zcat. a)Uncompress the 40GB file and have it in the disk. use cat to view the steps. b)Use zcat directly to view the compressed file? What are the steps being occurred in step (b)? Where... (3 Replies)
Discussion started by: pandeesh
3 Replies

8. Shell Programming and Scripting

awk & zcat not working together

I have a tar file which i want to read and check some specific fields basis on which i want to get output. Code zcat samplefile.tar.gz | awk 'FNR==1 {++counter} counter ==2 {BB=1;next} substr($0,26,2) =="01") {next} (substr($0,28,12) ~ "^") {next} (substr($0,184,3) in BB) {next} 1 '... (7 Replies)
Discussion started by: siramitsharma
7 Replies

9. Solaris

ZCAT xxx.Z|tar -xvf - decompression slow ?

I have recently built a new server and patched Soalris 10 up tp latest bundle etc... When I run a decompress using the format zcat fred.Z |tar -xvf - it runs at a very slow rate. A similiar server which is less powerful runs over twice as quick. Is there any work arounds to configure decompress... (4 Replies)
Discussion started by: smcart
4 Replies

10. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
PMAFM(1)						      General Commands Manual							  PMAFM(1)

NAME
pmafm - Performance Co-Pilot archive folio manager SYNOPSIS
pmafm folioname [command [arg ...]] DESCRIPTION
A collection of one or more Performance Co-Pilot (PCP) archive logs may be combined with a control file to produce a PCP archive folio. Archive folios are created using either mkaf(1) or the interactive ``record mode'' services of PCP clients like pmchart(1). pmafm provides a number of services that may be used to process folios. In particular, it provides support for execution of PCP tools using one or more of the component archive logs within an archive folio. The target folio is identified by the folio control file folioname. The syntax for a folio control file is described in mkaf(1). If present, the command and arguments following folioname are interpreted and executed as a single command, otherwise commands are read from standard input. The following commands are supported. archives Subsequent commands apply to all archives in the folio. archives N[,...] Archives within a folio are numbered 1, 2, etc. Subsequent commands are restricted to apply only to the designated archives. archives name[,...] Archives within a folio have unique names. Subsequent commands are restricted to apply only to the designated archives. check Validate the presence and format of each file in the folio and the component archives. help A brief reminder of the command syntax. ? is a synonym for help. hosts Subsequent commands apply to all archives in the folio. hosts hostname[,...] Subsequent commands are restricted to apply only to those archives that match the designated hostnames. list [verbose] Display the contents of the folio. By default the control header and the ordinal number, hostname and archive base name for each archive in the folio. The verbose option causes pmafm to dump the label record from each archive using pmdumplog -l. The first named archive in the folio is assumed to be associated with the default host for any tool that tries to replay multiple archives from the folio. quit Exit pmafm. remove Echo on standard output the sh(1) commands required to remove all of the physical files associated with this archive folio. repeat tool [arg ...] Execute the known PCP tool once per selected archive. For example, the command repeat pmval -t60 kernel.all.load would run pmval(1) once per archive, with an appropriate -a argument. replay Some archive folios are created by tools (e.g. pmchart(1)) that provide sufficient information to allow all of the information in all of the archives of a folio to be replayed. [run] tool [arg ...] Execute the known PCP tool on the selected archives. Some PCP tools are able to process multiple concurrent archives, and in this case the tool is run once with the list of all selected archives passed via a -a argument. Otherwise, this command is synonymous with repeat. selections Display those archives that would be selected for processing with a repeat, replay or run command. The restrictions via any hosts and archives commands are conjuncted. These restrictions serve to limit the specific archives processed in the subsequent repeat, replay, run and selections commands. By default, all archives are selected. Keywords in commands may be abbreviated provided no ambiguity is introduced, e.g. help, hel and he are synonymous, but h is ambiguous. FILES
$PCP_SYSCONF_DIR/pmafm/* control files that define the behavior of each PCP tool known to pmafm. This information may be customized or extended, see $PCP_SYSCONF_DIR/pmafm/pcp for documentation of the syntax and semantics of these files. $HOME/.pcp/pmafm/* User customization of the control files. All files in this directory are treated in the same manner as control files in the $PCP_SYSCONF_DIR/pmafm directory. PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
mkaf(1), pmchart(1), pmview(1), PMAPI(3), pmRecordSetup(3), pcp.conf(5) and pcp.env(5). DIAGNOSTICS
Many, but all are intended to be easily understood. Performance Co-Pilot PCP PMAFM(1)
All times are GMT -4. The time now is 11:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy