under SQL directory we have only the tmp folder (tmp folder usage 59G)is it possible to compress the folder tmp without to leave the original tmp folder ?  , so the compression will work on the original folderthe folder usage: root@serverE1:/var/backup/SQL #  du -sh * 59G     tmpso after compression I will see only this :  (8G is only example) 8G   tmp.tar.gz
how to compress a folder without to leave the original folder and without to remove the original folder
linux;tar;gzip;cpio
There are two problems to solve:how to remove the files without interfering with your output, andwhere to put the output while it is being created.If you happen to not have any dot-files in /var/backup/SQL, it is simple:just create your output named with a leading .,add to the tar-file using the --remove-files option, andrename the output to tmp.tar.gz when done.Something likecd /var/backup/SQLtar cfz .tmp.tar.gz --remove-files * && mv .tmp.tar.gz tmp.tar.gzIf you do have dot-files, then you could construct a list of the files to be tar'd and then use that list in constructing the tar-file.  Using Linux, you could use the -T (--files-from) option to read this list, e.g.,cd /var/backup/SQLfind . -type f >/tmp/listtar czf tmp.tar.gz --remove-files --files-from /tmp/list(Someone's sure to suggest process substitution rather than a temporary file, but that has the drawback of limited size, which may be a problem).