[ubuntu] Batch files compressing and renaming

view story

http://ubuntuforums.org – Hi everyone, I am learning and using Linux for more than 10 months, learning new things every day. i have a task here today, just want all of ur help to direct me in the right way . I have a folder with the set of files eg: 1000 jpgs each jpg with the size of 2MB. The task is i want to write a command and compress a all these jpgs to with the size of l gigs, ie i want all these 1000 jpgs in the folder as set of compressed files(.tar or .zip)with the size of 1 gb. I hope my question make sense. it would take ages if i am selecting manually and doing it. I am sure linux has a simple a (Hardware)