Re: gzipping multiple files w/o tarring

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 02:49:44PM -0400, Joe Tseng wrote:
 
 I'm sure this is easy but googling hasn't gotten me anywhere yet...  I want 
 to compress all the files in my directory that don't already have a .gz 
 extension.  I want them to be individual compressed files, not part of a 
 single .tar.gz file.  Can anyone point me to where I can find how to do this?

gzip * will do what you want.

When it encounters something that's already gzip'd, it will skip it,
but will emit a warning that it's doing so.

Otherwise, you could use something like:

find -X . \! -name *.tar.gz -type f -maxdepth 1 | xargs gzip

Which would do the same as gzip *, but would ignore any files
with a .tar.gz extension.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gzipping multiple files w/o tarring

2008-10-10 Thread Mike Jeays
On October 10, 2008 02:49:44 pm Joe Tseng wrote:
 I'm sure this is easy but googling hasn't gotten me anywhere yet...  I want
 to compress all the files in my directory that don't already have a .gz
 extension.  I want them to be individual compressed files, not part of a
 single .tar.gz file.  Can anyone point me to where I can find how to do
 this?

 tia,

  - Joe
 _
 Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
 http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!5
50F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008__
_ freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

gzip * will do it.  It leaves out files that already have the .gz extension.
gunzip * will put them back the way they were.

-- 
Mike Jeays
http://www.jeays.ca
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gzipping multiple files w/o tarring

2008-10-10 Thread Wojciech Puchar


gzip * will do what you want.

When it encounters something that's already gzip'd, it will skip it,
but will emit a warning that it's doing so.

Otherwise, you could use something like:

find -X . \! -name *.tar.gz -type f -maxdepth 1 | xargs gzip


i don't understand the difference.

.tar.gz files are already gzip'd :), so no need for second case. it will 
be skipped anyway

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gzipping multiple files w/o tarring

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 09:42:41PM +0200, Wojciech Puchar wrote:

 gzip * will do what you want.

 When it encounters something that's already gzip'd, it will skip it,
 but will emit a warning that it's doing so.

 Otherwise, you could use something like:

 find -X . \! -name *.tar.gz -type f -maxdepth 1 | xargs gzip

 i don't understand the difference.

The 2nd will avoid the warnings emit by gzip * when encountering
already-gzipped files.

It all depends on what the user wants.

 .tar.gz files are already gzip'd :), so no need for second case. it will  
 be skipped anyway

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]