Ubuntu – How to create a zip file from contents of a folder with certain name pattern

bashcommand linegziptar

is it possible to create a tar.gz file from contents of a folder but only put the files with certain name pattern in the archive and ignore the rest? for example just put the files which their names are log_?

Best Answer

You can use tar directly:

tar -zcvf file.tar.gz log_*
Related Question