1

Please assume, we execute gzip or gunzip on a relatively large text file (>1GB) or files as such within a directory. During the process, either mistakenly or intentionally the process is killed.

Is there any risk that the original content of the files is damaged? If so, is there an advisable practice for executing gzip/gunzip differently, e.g. with certain options, or do we need to wait until gzip/gunzip finalises its execution?

Herpes Free Engineer
  • 2,425
  • 2
  • 27
  • 34

1 Answers1

2

gzip/gunzip should only remove the original file after the operation is complete. To be sure of this, you can pass the -k or --keep option to prevent the original file from being removed at all during your script or operation.

retupmoca
  • 262
  • 1
  • 6