3
I'm pretty new to unix so go easy.
Normally gzip file
replaces file with file.gz (which i'm guessing is: create file.gz then rm file).
I have some rather large files I'm compressing and I like to see the progress and eta so I use
pv -tpreb file | gzip -9 > file.gz
But now I am left with the original file along with the new file.gz. I don't want to have to rm the original manually.
What should I do?
4It seems that you cannot.
pv
reads the files and pipes togzip
thereforegzip
gets its input fromstdin
. Of coursegzip
will have no clue that the input actually comes fromfile
and therefore cannot delete it. – Kenneth L – 2016-01-12T02:22:29.323