can someone help me to create a short script that tar.gz all folders form a specific folder and the delete the folders themself (without deleting the tar.gz created files)?
Moreover I'd like to add it on crontab and run it each day.
I'd like to tar.gz test1 test2 test3 test4 and then delete the folder (not the new testX.tar.gz).
Compression can be also done according to specific folder month.
not sure I understood what you wanted...
Is it you want to archive /tmp/test ( easy...) or separately each testX subdir, in which case you would have many archives...
I already have a list of directory in /tmp/test.
I'd like to compress directory by directory and then delete only the directory (not the created compressed file).
Goal is to have: