user2520969
user2520969

Reputation: 1389

Zip list of files from terminal in Ubuntu Server

I'm using Ubuntu Server and i would zip a list of files contained in a directory called "backups".

So, using the zip command from command line, how can i do to zip all files with a name that starts with a particular prefix?

For example, I have these files:

I would zip only files with a name that starts with "2016".

Can you help me?

Upvotes: 0

Views: 640

Answers (1)

elicohenator
elicohenator

Reputation: 747

try using an asterisk after 2016 - like this:

zip 2016archive.zip 2016*

you can learn more by typing in your terminal zip --help

Upvotes: 1

Related Questions