LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2006, 05:46 PM   #1
bhuwan
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
Zip many Files separately


Zip many files in a directory separtely
i.e. files in directory:

foo1.wmv
foo2.wmv
foo3.wmv

<Comand I dont know goeshere>

Final result:
foo1.zip
foo2.zip
foo3.zip
 
Old 02-16-2006, 05:58 PM   #2
arsham
Member
 
Registered: Mar 2004
Location: London
Distribution: Arch Linux, Debian
Posts: 184

Rep: Reputation: 30
gzip foo{1,2,3}.wmv
makes .gz files

Last edited by arsham; 02-16-2006 at 05:59 PM.
 
Old 02-16-2006, 06:01 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Does it have to be zip? For example bzip2 will do it with:
Code:
bzip2 *
You can decompress with:
Code:
bzip2 -d *
 
Old 02-16-2006, 06:04 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Go into the directory with the files and try this:

Code:
for i in *; do zip `basename $i .wmv`.zip $i; done
Note that those are back quote (on the ~ key)

I'm not sure wmv's will compress too far though...

Last edited by pljvaldez; 02-16-2006 at 06:05 PM.
 
Old 02-16-2006, 06:16 PM   #5
bhuwan
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez
Go into the directory with the files and try this:

Code:
for i in *; do zip `basename $i .wmv`.zip $i; done
Note that those are back quote (on the ~ key)

I'm not sure wmv's will compress too far though...
works! I am not considered about compression :_)
Thanks a lot to all!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling modules separately Alex_jacobson Linux - General 2 03-11-2005 01:43 AM
zip files cooldudeguy Linux - Software 2 10-24-2004 02:57 AM
*.zip files e1000 Linux - Software 2 12-30-2003 10:40 AM
Zip Files linuxsoundprob Linux - Software 8 08-26-2003 06:34 AM
.zip Files Wynd Linux - Newbie 4 08-01-2001 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration