hi, thanks for reading my post here.

i am sharing this helpful command to show you how you can use the wild card in a command using the tar command

for example, lets say i only want to include certain files in my archive, this is how i can do this:

tar -pczf foo.tar.gz wallpapers/007*.jpg

in my example above, i am creating a tar archive called foo.tar.gz that includes all wallpapers that start with 007

tar -pczf foo.tar.gz wallpapers/*007.jpg

in my example above, i am creating a tar archive called foo.tar.gz that includes all wallpapers that end with 007

to confirm you have only archived the files you wanted, you can list the files in the newly created tar archive by listing the files it contains:

tar -ztvf foo.tar.gz


done, hope this helps.