Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 17, 2021 06:02 am GMT

Is there any way I can change a file header in Linux like how I'd change a file extension in Windows (10).

I know in Windows, "file extensions", the part of a file name after the final period in the file name, are more than just part of the file name, they also act as metadata to tell Windows what kind of file the document should be treated as, and what apps to open them in (i.e. what apps are associated with those file types).

However, I want to start moving to Linux (Ubuntu) which I installed on my PC a while back, so, I recently tried making a new file ("extensionless"), and I wanted to make it a different type, so I tested to see if that would work by testing by renaming it .go, so I could try to open it in VSCode like I normally would on WIndows.
Surprise, it doesn't work.

I look up multiple searches, involving how to change the file extension (only getting results using command line), and eventually coming over to a horrifying S.O. answer that horrified me, it gave me the info that "extensions" (file types) are determined by header.

There doesn't seem to be any way in the "Files" file manager for Ubuntu to change the header type.
There seems to be no concept of anything other than a plain "Text" file.
(Well, there is, but you just can't see or change it.)


What I want is a program that can give me a simple GUI to edit the file type of a file so I can easily go between one or the other as needed/wanted.
(Even better, and more appreciated would be some kind of program that works with "Files" to add the option to change the filetype-header in context menu (when a certain file is selected). Though, either will do.)

Info:

OS: Ubuntu 20.04.2 LTSWindowingSystem: X11GNOME: 3.36.8

Original Link: https://dev.to/baenencalin/is-there-any-way-i-can-change-a-file-header-in-linux-like-how-i-d-change-a-file-extension-in-windows-10-5257

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To