LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-01-2009, 04:48 AM   #1
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: PCLinuxOS Arch
Posts: 135

Rep: Reputation: 18
Compression with zcat and cpio


What is the opposite command to compress this archive:

zcat minirt.gz | cpio --extract

The above command expands the archive minirt to the current directory.

However I'd like to know the opposite command to compress all the files in the current directory with cpio and zcat.
Thanks in advance.
 
Old 01-01-2009, 05:00 AM   #2
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,262

Rep: Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561
You can use the form "| gzip >filename.cpio.gz" to compress the cpio archive.
Code:
cpio --create < <(ls netfilter-*.ps) | gzip >netfilter.docs.cpio.gz
1007 blocks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cpio -idcmv command hanged while extracting .cpio command ravindra.atre Linux - General 2 08-22-2011 04:10 AM
Diffrernce between cat and zcat ZAMO Linux - General 5 06-27-2007 09:31 PM
Zcat broken? keysorsoze Solaris / OpenSolaris 3 03-28-2007 01:01 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 01:53 PM
cpio.gz?? unprocessed Linux - Newbie 7 09-11-2002 04:37 PM


All times are GMT -5. The time now is 10:14 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration