I can't believe it... xedit ruined my C project...
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can't believe it... xedit ruined my C project...
I had to finish my academic project in C language until 31/8, and just now, xedit ruined it!!!
I don't know what to do... I think it is xedit, because only when I write files with xedit it ruines them.
now, one of my important source files looks like that:
file1.c^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ustar^@^@^@^@username
<content of file1.c>
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
file2.c^@^@^@^@^@^@^@^@^@^@^@^@^@ustar^@^@^@^@^@username^@^@^@^@^@
<contentof file2.c>
^@^@^@^@^@^@^@^@^@^@^@^@^@ustar^@^@^@^@^@username^@^@^@
and so on.......... where "username" is my username....
it does that for all fileX.c except my ruined file.... I just don't know what to do... and the file.c~ files are gone...
any idea what to do????
thanks alot alot for any advice...
I don't know much about this, you could try another editor.
But on a general note I hope you were smart enough to have recent backups made. For anything important you code you should do that like daily or everytime you worked on it.
SirSlappy: no it wasn't, it was on a ReiserFS partition.
SheldonPlankton: no I didn't do that, it was compiled by a makefile.
darkleaf: from now on, be sure I won't be using xedit anymore.
I didn't had backup files becuase my partner on the project wrote to delete them in the "make clean" section in the makefile.
Take a look if xedit did not create some temp files at the same folder where you have your project, usually something like "project.cpp~". I know that some editors do that...
man, I decided to make some "investigation" and to find out what is "ustar"... it is an algorithm or something used by tar to make tarballs.... so I tried to recall on what I did related with tar...
and now I remember I accidently (sp?) did this command:
tar -cf file1.c file2.c file3.c file4.c ...........
MANNN, I am so stupid!!!!
and that's why my ruined file1.c contains all other files in the project...
I am so ashamed I blamed xedit... I should blame myself!
and now I really see that file file1.c prints:
"file1.c: POSIX tar archive"
I guess there is no way to recover the file... no *.c~ files too... this is pure stupidity what I did there... now I know that linux doesn't ruin files by itself... it is all human mistakes.
I tried, but I didn't get file1.c... I get file2.c file3.c file4.c etc... coz the command was
"tar -cf file1.c file2.c file3.c file4.c" ...
is there any way I can recover file1.c to what it was *before* it was a tar archive?
Ha ... I knew it had to be something like that. Seriouly though if you are doing something important to you BACK IT UP! You don't have to go out there and setup a AMANDA server but you should at least consider CVS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.