SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-04-10 21:18:55

837183
Member
Registered: 2013-04-19
Posts: 35

Is there a possibility to hide file name extensions?

smile

Offline

Help fund CrunchBang, donate to the project!

#2 2015-04-10 21:30:33

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Is there a possibility to hide file name extensions?

no  yikes

NOTE:  I was joking as I thought this a joke.

bash files can be filename.sh or just filename I use both - and something tells me I shouldn't but it's an old habit.  You know gut feeling.

--- edit to add NOTE

Last edited by Sector11 (2015-04-11 12:10:55)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#3 2015-04-10 21:53:42

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Is there a possibility to hide file name extensions?

My understanding is that the extension in linux is just part of the filename - it doesn't actually indicate the filetype. UNIX decides it using the "magic number" in the file, unlike windoze which uses the extension.


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#4 2015-04-11 02:02:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Is there a possibility to hide file name extensions?

AFAIK the extension is quite optional. Leave it off any files you create if you want.

However, some applications do look for a certain file extension, even on Linux. Try renaming something.tar.gz to something.zip and opening it with file-roller. It will refuse, saying the file is corrupted or something. I seem to remember similar things with image file names.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#5 2015-04-11 06:13:23

nore
>2^9
From: Lakeland
Registered: 2009-11-28
Posts: 740

Re: Is there a possibility to hide file name extensions?

837183: please explain the benefits of hiding part of a file name. What do you want to achieve?

Offline

#6 2015-04-11 13:15:02

837183
Member
Registered: 2013-04-19
Posts: 35

Re: Is there a possibility to hide file name extensions?

nore wrote:

837183: please explain the benefits of hiding part of a file name. What do you want to achieve?

esthetics, that's all  smile

As @johnraff and @damo have said..the extension IS optional - but if I leave it off and transfer the file to my smartphone or to a windows machine..well..Windows and Android do rely on the extension to open the file, so I'm wondering if there's a way to keep the extension in the filename but hide it

Offline

#7 2015-04-11 15:00:18

twoion
Emerald Caffeine
From: 星界
Registered: 2012-05-11
Posts: 1,648

Re: Is there a possibility to hide file name extensions?

johnraff wrote:

AFAIK the extension is quite optional. Leave it off any files you create if you want.

However, some applications do look for a certain file extension, even on Linux. Try renaming something.tar.gz to something.zip and opening it with file-roller. It will refuse, saying the file is corrupted or something. I seem to remember similar things with image file names.

This is exactly my observation, too. For example if you attempt to

$ unzip -x archive.zip.rar

unzip will blather something about corrputed or invalid ZIP files. Meh.

Extensions should, like mimetypes, be treated as hints. The difference between mimetypes and extensions is that usually mimetypes have to be guessed for files using magic numbers or patterns since files typically are not stored together with that information (although that's entirely possible using extended attributes). I say hints because PDF files can be valid ZIP archives, or both an image AND a ZIP archive AND a Flash video AND an audio file -- see for example this lecture for examples. It's pretty much the same problem as with text encodings big_smile

I am all for tagging files with the needed metadata -- preferably as extended attributes . The solution that ships with KDE for example is Nepomuk/Baloo: You can add tags, ratings and comments to files which complement the data in the actual file.


Tannhäuser ~ {www,pkg,ddl}.bunsenlabs.org/{gitlog,repoidx}

Offline

#8 2015-04-12 01:13:47

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Is there a possibility to hide file name extensions?

twoion wrote:

PDF files can be valid ZIP archives, or both an image AND a ZIP archive AND a Flash video AND an audio file -- see for example this lecture for examples.

Amazing stuff.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#9 2015-04-12 02:13:11

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: Is there a possibility to hide file name extensions?

^ You'll remember that JPGs can also be used as RAR archives.  (c.f. "Post sinks!")

Anyway, to my knowledge, there is no way to hide filename extensions in Thunar or PCManFM.  There was a thread on this at the Ubuntu forums several years ago, which took a similar direction to this one.
http://ubuntuforums.org/showthread.php?t=859583

Offline

#10 2015-04-12 08:28:53

ohnonot
...again
Registered: 2012-05-22
Posts: 2,205

Re: Is there a possibility to hide file name extensions?

all that's been said here and over at the UF thread is true.

However, since some share your sense of esthetics, it might be that some of the "Big" File managers have this option (KDE, Unity, Gnome...).
i know nautilus is gnome's and unity's fm, and might pull in the least dependencies - but i still don't recommend installing it just like that, if you're not using one of those DE's. this is even more true for kde stuff, so just make yourself some usb-sticks with some bloat distros and try it live.


or maybe some 2-pane-file-manger (like doublecmd, emelfm2, gnome-commander) has that option, too.

You will have to try everything and see for yourself.

Last edited by ohnonot (2015-04-12 08:29:17)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo