When I try to compress the directory into a .tar format it creates successfully, but the tar files contains extra lines(Header/Metadata). I have .csv file in a folder and i need to convert that folder into tar without adding extra lines in the files.
I think there is some misconception:
tar does not compress (unless used with special options), but puts files in a file (or originally on a tape). And you seem to be doing soemthing like
tar cf calc.tar calc.csv cat calc.tar
so you'll see your file including that "meta information" you see. And have a look at
du calc*: You don't save space because you don't compress anything.
This is not the intended use of
tar! If you want to save space, you'll probably want to do
gzip calc.csv zcat calc.csv.gz