TAR Multiple Directories
I think this maybe easy to answer or maybe not. I want to TAR multiple directories (their files and subdirectories) in which the output of all TAR will be the same as the directory (1 -> 1.tar.gz, 2 -> 2.tar.gz, 3 -> 3.tar.gz ........).
Can this be done? I know cPanel cpbackup script does this but I am doing this on a different server with no cPanel installed. Also, I want to do it that when I extract them, it should be content of the directory already and not the folder and that I need to move the contents (i.e. 1.tar.gz -> 1.htm, 2.htm, 3, 4.pdf and not 2.tar.gz -> 2).
Hope someone can give me the right command.