LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 01-01-2009, 05:48 AM   #1
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Debian / PCLinuxOS
Posts: 110
Thanked: 2
Compression with zcat and cpio


[Log in to get rid of this advertisement]
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.
hal8000b is offline     Reply With Quote
Old 01-01-2009, 06:00 AM   #2
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 12,876
Thanked: 232
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
jschiwal is online now     Reply With Quote

Reply

Bookmarks


Thread Tools

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


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


All times are GMT -5. The time now is 05:25 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration