Questions tagged [file-extension]

A file extension is the last part of a typical filename, signifying what type of file it is.

File extensions are used to indicate what kind of file something is. Extensions come at the end of a filename, and are indicated by a dot (.) followed by a few characters. Example extensions include:

  • .txt - A text file.
  • .odt - An OpenOffice.org/LibreOffice document file.
  • .png - A PNG picture file.
  • .mp3 - A music file using the MP3 format.

Note that the dot does not come at the front of a filename; that is used instead to indicate that it is a hidden file/folder.

Oftentimes, a file extension is not required as part of the filename on a Linux system, as it is on a Windows system. However, it does typically make it clearer as to what the file is for.

4 questions
26
votes
6 answers

When creating a new text file, should I add a .txt extension to its name?

When I create a new document aimed at containing only plain text, I am not obliged by Ubuntu to add a .txt extension to its name. It works indeed very well: gedit opens it without problem, understanding very well that it is only text. The only two…
Agmenor
  • 16,394
20
votes
5 answers

How to add an extension to all files via terminal

I would like to add the .zip extension to all files. I tried this, however it does not work: ls | awk '{print $1 " " $1".zip"}' | xargs mv -f
UAdapter
  • 17,967
11
votes
4 answers

How to highlight just the name (not the extension) for renaming?

Is there a way to turn it off so that when you're renaming a file, it doesn't highlight the extension?
David R
3
votes
1 answer

How to sort files by file extensions through the command line?

This is my question: How to sort files by file extensions through the command line?
Ederico
  • 6,437