Monday 31 August 2020

How to zip/unzip files on the fly, when we have space constraints

 To unpack on the fly:

gunzip < FILE.tar.gz | tar xvf -


To pack on the fly:
tar cvf - FILE-LIST | gzip -c > FILE.tar.gz


Another method, without creating a tar on the local server at all:


server1> tar cvf - 19.3.0 | ssh oracle@server2 "tar xvf - -C /u01/app/oracle/product"