views:

7

answers:

0

If I have a folder with a bunch of images, how can I tar ONLY the images and not the folder structure leading to the images without having to CD into the directory of images?

tar czf images.tgz /path/to/images/*

Now when images.tgz is extracted, the contents that are extracted are /path/to/images/...

How I can only have the images included into the tgz file (and not the three folders that lead to the images)?