1

This question already has an answer here:

Trying to tar a file called report, but accidentally running wrong format

$ ls -l
-rw-r--r--  1 root root      708 Aug 20 10:12 report
$ tar czvf report report.tar.gz 

then

$ ls -l
-rw-r--r--  1 root root       45 Aug 20 10:13 report

how to recover the original file?

marked as duplicate by Kusalananda, Thomas Dickey, Scott, Gilles, jordanm Aug 20 '16 at 23:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    hmm I think you found an interesting way to destroy a file... – Zanna Aug 20 '16 at 18:24
  • I made a similar mistake on a NTFS drive. Instead of extracting the file, I overwrote it. I was able to recover the original archive using a hex editor. – Uroc327 Aug 20 '16 at 20:17
  • I made a similar mistake on a NTFS drive. Instead of extracting the file, I overwrote it. I was able to recover the original archive using a hex editor. – Uroc327 Aug 20 '16 at 20:18
  • See also Recovering accidentally deleted files. – Scott Aug 20 '16 at 21:29

Browse other questions tagged or ask your own question.