I downloaded a text dump. It has the extension .v2.gz. Using gzip on the .v2.gz file shows me text. I have used gunzip to uncompress the file with .v2 format. How can I save it as .txt because the program which I need to run will only accept UTF-8 encoded .txt file.
Asked
Active
Viewed 409 times
1 Answers
4
The extension probably does not matter. While some applications use or are able to use filename extensions in Ubuntu (and Linux systems generally) to identify file formats, most of the time, other methods are used to determine file type (checking for a magic number or header in the first few bytes of the file is the typical way).
You can read discussion of this in glorious detail in this question.
Since you checked the format of the file with the file
command and found that it is already UTF-8 text, the .v2
extension must be arbitrary and you probably don't need to do anything at all. However, I don't know what program you are using, so in the case that it really requires that extension, rename the file, for example with the mv
command:
mv file.v2 file.txt
file name-of-your-file.v2
? (replace with your secret name obviously) – Zanna Sep 05 '16 at 14:19UTF-8 Unicode text, with very long lines
– Sep 05 '16 at 14:21