Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
show 2 more comments

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.