Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I there any possibility to recover file contents after echo "" > file.txt?

I'm using Ubuntu 10.04 and my filesystem is vzfs

share|improve this question
    
What's behind your /dev/vzfs? Check with mount. – ott-- Jan 25 '13 at 13:36
    
Do any other users have access to the same file? – Julian Knight Jan 25 '13 at 13:42
    
@ott-- Mount produces following output: /dev/vzfs on / type vzfs (rw,relatime) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) none on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000) – Kristian Jan 25 '13 at 14:03
    
@JulianKnight Probably not cause i have edited the file. – Kristian Jan 25 '13 at 14:04
    
My point was that, if another had the original file, your edit creates a local version of the shared file, that's how vzfs works. So they would have the original file and could let you have a copy back. But if you've edited it and then truncated, you are stuffed unless you also have a backup or version control. – Julian Knight Jan 25 '13 at 16:44
up vote 0 down vote accepted

If another had access to the original file, your edit creates a local version of the shared file, that's how vzfs works.

So they would have the original file and could let you have a copy back.

However, if you've edited it and then truncated, you are stuffed unless you also have a backup or version control.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .