[Ref] Filenames in Unix/Linux/Posix : Does it really matter?

https://www.dwheeler.com/essays/fixing-unix-linux-filenames.html

The above "article will try to convince you that adding some tiny limitations on legal Unix/Linux/POSIX filenames would be an improvement. Many programs already presume these limitations, the POSIX standard already permits such limitations, and many Unix/Linux filesystems already embed such limitations — so it’d be better to make these (reasonable) assumptions true in the first place.
This article will discuss, in particular, the three biggest problems:
-control characters in filenames (including newline, tab, and escape),
-leading dashes in filenames,
-and the lack of a standard character encoding scheme (instead of using UTF-8)."

|

It's a long read, and mainly about Unix/Linux/Posix, but a good reference, nonetheless, with links that also point to other modern issues that crop up in NAS/NFS, Shared SMB systems, ..., and the limitations that you may run into, (regarding the use of proper Filenames, or Foldernames), with other proprietary file systems, such as NTFS, or in MacOSX, ...

4 Likes

The above is more like Reference material than it is a simple Tutorial.
If mods feels this should be moved elsewhere, then plesae do,
thx.

under Filename limitations (characters, length) for various Filesystems:
https://helpful.knobs-dials.com/index.php/Computer_data_storage_-_Partitioning_and_filesystems#More_specific_filesystem_notes

I don't like this idea, if it is what I think it is its lame. I like naming files 5ygder5yggdr45tygu7uuhvttfrt44thu6yg5rdr4trredftttgghuu6yt.png
Is that what your talking about, honestly I did not read the article :smirk:

that's fine, name them whatever you want.
But mainly, this is about avoiding "invalid" characters, when sharing filenames across ext*/NTFS/Apple/...

Oh, i understand but some download programs will do this like downthemall, I know wget didn't work befor cause it basically said there was an invalid character and it was the name the site gave to it....a bit off topic....but why cap a system? Shouldn't they be forced to expand their filesystem instead of capping another?

OK, that is too much to read. I started questioning how old was this article. When its start talk about 'printf' not being standards in most shells. Note, never readed the title. OK, I never seen a filename starting with - in my life. I been using Linux since summer of 2008. Nor have I seen this happened in BSD system. But I'm not a programmer. So I can't speak for them.
Another thing to note. BSD file system is much cleaner compare to Linux. Less simi linking files.

2nd this need to be in off-topic

Ok, then nevermind, since you didn't really read or understand anything else, except for nitpicking about printf.
It's meant to be a basic reference, and not a 2-sentence tutorial.

lol, talking about invalid characters, and the havoc they may cause:

So there 'ya go. It happens more often than not, especially for new Users to Linux that, for example, also share "filenames", with their Windows/NTFS, and/or Apple... too.

2nd if you want it moved to off-topic, then ask mods to do so.

Forum kindly sponsored by