Every time I stop working on a particular project, I tar up the whole directory where I was working, (ie writing C++ code)
tar -cvf Friday_Afternoon.tar ./
,storing compiled program , source and everything in that one tarball.
That way I conveniently send it home to work on for the weekend.
In fact, it doesnt matter wether this .tar gets emailed or not,
when I untar it
tar -xvf Friday_Afternoon.tar
in a new directory,
the source is almost intact, except for one file which gets totally mangled,
mainly: I can read the content of some of the other files inside it (those that are in the directory,some are included in said file that s got corrupted) at other places,
stuff like this:
and at other places, stuff that looks like compiled code
��������,���� `���:̍^LI܍V �4Z�
u��E�^�� ¤ `��kP�~"
_ ┌² ¶ <Q É LÕ Û \¸ " ó ┌
(aspect changed when pasted into this post)
followed by stuff like this, which i never typed in said source file:
So, just about anything can be found in the file, except the original source, which is nowhere to be seen
Am I tarring untarring it wrong?
is it because there s some compiled program along with the sources in the archive?
can it be because some of the source files contain the words #include another file in the dir (seems a common case !).