Is there an elegant one-liner to tar/archive the whole directory and delete it afterwards? So far I came up with bulky solutions.
from:
# ls -la
drwxr-xr-x 3 root root 4096 Jul 4 15:01 .
drwxr-xr-x 6 root root 4096 Jul 4 14:54 ..
drwxr-xr-x 4 root root 4096 Jul 4 14:59 stresstest
to:
# ls -la
drwxr-xr-x 3 root root 4096 Jul 4 15:01 .
drwxr-xr-x 6 root root 4096 Jul 4 14:54 ..
drwxr-xr-x 4 root root 4096 Jul 4 14:59 stresstest.tar.gz
EDIT #1
The problem is I do not know the name of the directory in advance (it is dynamically created, so next time it will be different), but it will always be the only directory here.