compressing and uncompressing a file with the help of xargs

$ls stderr.txt 
stderr.txt
$ls stderr.txt | xargs ls
stderr.txt
$ls stderr.txt | xargs cat
/home/jeffrin/quark/kernel/run_kernel.sh: line 10: ./main.native: No such file or directory
$ls stderr.txt | xargs gzip
$ls stderr.txt 
ls: cannot access 'stderr.txt': No such file or directory
$ls stderr.txt.gz | xargs gunzip 
$ls stderr.txt 
stderr.txt
$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s