Script tar+gzip traverse a directory
I would like to ask a help in creating a script that would traverse a directory and doing a tar on those directories. Example scenario is this. I have a folder named temp and in that directory, I have 3 other directories which I want to tar on a different file location, say for example /home/user1. How am I be able to accomplish such. I am not familiar with bash/perl programming as I have only started learning it. Thanks in advance.