Compress and remove original directory with limited storage
You can try the --remove-files
argument to tar. Say you want to compress everything on directory FOO, you would:
tar -czf FooCompressed.tar.gz --remove-files FOO
Arguments explained:
- c: create TAR
- z: compress using GZIP, you can switch to
-j
for BZIP2 or-J
for LZMA(xz) - f: output to file instead of of STDOUT
- remove-files: self explanatory