How to create tgz file for all the directories in one time?

Hi,

On server there is an one folder . which contains sub folder

Eg - TEST folder contains

test1, test2, execr ,tt (folder). also includes some text file like abc.txt psp.txt gg.log.

here iwant to create tgz file for all the folders and file in one time.

I know the command for creating tgz file which is

 tar -czf abc.log.tgz abc.log   

but as there are so many folders and files i want to create one command which will create tgz files for all the folders and files in one time.

Thanks

Execute this command in the TEST directory..

 
tar -cvf tarfile.tar *
1 Like