More on Compress/Uncompress

Only very lately I figured out that there is a way to compress/uncompress files to a different directory / location/ folder on UNIX.  This is very important while taking a compressed OS backup or restoring compressed files from backup.

To compress to a different folder / locaiton :

compress -c /appl01/orabkup/system01.dbf > /u01/oradata/ORCL/ORCL_system01.dbf.Z
or
compress < /appl01/orabkup/system01.dbf > /u01/oradata/ORCL/ORCL_system01.dbf.Z

To uncompress to a different folder / locaiton :

uncompress -c /appl01/orabkup/ORCL_system01.dbf.Z > /u01/oradata/ORCL/system01.dbf
or
uncompress < /appl01/orabkup/ORCL_system01.dbf.Z > /u01/oradata/ORCL/system01.dbf

This may be a very primitive one, but I learned it very recently. Hope it helps you!

One Response to “More on Compress/Uncompress”

  1. Nanjundeswar T Says:

    Thanks.
    It was a valuable information.
    I had the need and your posting helped me in time.

Leave a Reply