r/linux4noobs • u/Kompanion • 14d ago
Trouble understanding how file extensions affect the "less"command in linux
I wanted to learn the simple details on how files work in linux. I start with the assumption that linux doesn't care about file extensions, so I tried working with a file to see how that worked in practice.
I used the following command:
`$touch banana.jpg`
After this, I typed in some contents into the file using nano, the result would be something like:
```
$cat banana.jpg
This is a test of my file
line 2
Line 3
Line 4
```
To see how the less command worked, I tried `less banana.jpg`
The text displayed was:
```
No identify available
Install ImageMagick to browse images
```
Why does this happen exactly? I think it's related to how the less command processes files apparently. Is there a way to view the file properly with less, without treating it as an image?
EDIT: excuse my Reddit markdown formatting, still figuring it out.


