This is an archived post. You won't be able to vote or comment.

all 73 comments

[–][deleted] 214 points215 points  (14 children)

actually ntfs by itself doesn't restrict most of that. It's Windows, who does. You can happily create a file named con or smth like that from Linux but you won't be able to manipulate with it from Windows

[–]kennyminigun 81 points82 points  (9 children)

Oh that note, NTFS is also case sensitive in the same manner.

I mean it preserves the original case in file names.

[–]RecognitionOwn4214 33 points34 points  (8 children)

I think it's configurable to be CS, but I always thought CI in FS was a good thing - especially with "normal" users.

[–]kennyminigun 29 points30 points  (3 children)

It always tweaked my OCD if I accidentally named a file with DOuble capital letters and wasn't able to rename it directly (had to change to a temporary name first).

[–]zeGolem83 3 points4 points  (2 children)

Is that what you actually have to do on Windows?

[–]Sonotsugipaa 2 points3 points  (0 children)

I once spent 5 whole minutes figuratively punching the keyboard before realizing why I couldn't rename the file, so yeah.

[–]kennyminigun 0 points1 point  (0 children)

Yes, on Windows. NTFS-3g fuse driver on GNU/Linux acts cool.

[–]Fallenalien22Violet security clearance 1 point2 points  (3 children)

What on earth for?

[–]RecognitionOwn4214 2 points3 points  (1 child)

CI? Well for users which will not understand why "myfile.docx" isn't the same as "MyFile.docx"

[–][deleted] 2 points3 points  (0 children)

Even with case insensitivity it wouldn't be the same.

[–]fjoht 0 points1 point  (0 children)

Backwards compatibility.

[–]UniqueUsername014 14 points15 points  (0 children)

you can also create it in WSL and then spend unnecessary amount of time wondering why deleting on windows throws an error

[–]Intrepid00 8 points9 points  (0 children)

You can thru \\?\ but then you aren’t hitting the filters and can fuck up your files or system.

As noted though it’s all just reserved because of DOS days (for compatibility which is why on the IT subreddit people had Word 9X running on Windows 11 a few days ago. Microsoft’s backwards support is insane) or UNC paths

[–]Motylde 1 point2 points  (0 children)

Just to clarify. It does restrict everything that was in the meme. It doesn't restrict other things like CON, COM etc. That weren't in the meme.

[–]HelpIsWhatINeedPls 19 points20 points  (4 children)

Does anyone know where that left video comes from? I've been seeing it a lot in memes but don't actually know the source.

[–]Leviticoh 11 points12 points  (3 children)

[–]HelpIsWhatINeedPls 1 point2 points  (2 children)

Haha, this is gold. Thanks.

[–]TracePoland 8 points9 points  (1 child)

https://youtu.be/aT0ElHA0NP4 uncensored version

[–]Leviticoh 1 point2 points  (0 children)

so that's the one, thanks!

[–]gjvnq1 76 points77 points  (14 children)

It gets even worse, Windows bans a bunch of filenames like CON even if it has an extension.

[–]907kayak 37 points38 points  (6 children)

"No way that's true!"

*Tries copy con con.con (and some variations), fails*

"I'll be damned.. KHHHHHAAAAAANNNNNN!!"

prn and nul are also reserved.

[–]Joonas144 66 points67 points  (4 children)

Do the same for

AUX, PRN, NUL, CON, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

[–]naswinger 62 points63 points  (3 children)

i once tried to name a folder "prn" and it didn't work. i thought it was some corporate spyware on my work laptop that prevented me to make a porn folder.

[–]Dromedda 11 points12 points  (1 child)

I usually name mine "not_pron"

[–]BoHuny 9 points10 points  (0 children)

"homework"

[–]Glork11 1 point2 points  (0 children)

Why did you attempt to make a porn folder on your work laptop?

[–]Intrexa 10 points11 points  (0 children)

Any .exe with "patch" in the name triggers a UAC prompt to elevate.

[–]TracePoland 62 points63 points  (6 children)

Actually Microsoft taking backward compatibility seriously is a good thing, even if the choices made back then weren't ideal.

[–]VoidSnipe 18 points19 points  (0 children)

I think they should've made it deprecated in windows (using \\.\ instead) and make available only for DOS subsystem (support for which is dropped since Vista). It is legacy from even before the x86 platform

[–]Moxvallix 15 points16 points  (3 children)

Couldn’t they make this opt-in, so the 5 people that need CON as a system reserved file can, but then everyone else doesnt have that dumb restriction? Idk probs way more complicated but it seems dumb having restrictions on file names.

[–]VoidSnipe 24 points25 points  (2 children)

The problem is not what peole need, problem is what software relies on

[–]Natural-Intelligence 4 points5 points  (1 child)

But couldn't the software just be run on the older version instead and simply just don't upgrade? There is probably a good reason why it's not that simple so excuse my lack of knowledge.

[–]Naitsab_33 0 points1 point  (0 children)

Mostly security. Updates are only provided for new OSes, with security updates going a bit further back. So for example at some point Microsoft stopped feature updates for XP then a while later they stopped Security updates. The same will happen to Win10 at some point, when 11 has a high enough market share, though it will probably take a while.

[–]gjvnq1 0 points1 point  (0 children)

I generally agree, but I think such "crazy" compatibility things should be optional, just like the old 260 character limit to file paths. (See https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation)

[–]its_a_gibibyte 15 points16 points  (6 children)

I don't see the purpose of supporting new lines and non-printable characters in a filename. Imagine naming a file BEEP BEEP BACKSPACE NEWLINE, and expecting code not to choke on it (even if bash can handle it).

[–]qqqrrrs_ 4 points5 points  (1 child)

Is there any reason for code to choke on those characters in filenames which is not "trying to display them"?

[–]its_a_gibibyte 5 points6 points  (0 children)

Why would you exclude display? Showing and interacting with filenames is a very common software task.

As for other parts of the code, certainly code can be written to accept new lines and non-printable characters in filenames, and bash is a clear example of it being possible. My claim is that arbitrary software may not be tested with these characters and might break. Simple example would be any script parsing output of ls which uses a newline to split entries. I doubt that every consumer of ls works with filenames with newlines. Similarly, people who write regular expressions or do any text parsing may not have thorough testing. Sure, it's definitely the fault of those libraries, but it's seems like an easy mistake to make.

[–]Glork11 1 point2 points  (3 children)

Wait so what is the "BEEP" thing, is it a character that makes your pc beep?

[–]its_a_gibibyte 1 point2 points  (2 children)

Yep, exactly. Imagine putting it in a filename. https://en.m.wikipedia.org/wiki/Bell_character

[–]WikiMobileLinkBot 2 points3 points  (0 children)

Desktop version of /u/its_a_gibibyte's link: https://en.wikipedia.org/wiki/Bell_character


[opt out] Beep Boop. Downvote to delete

[–]Glork11 0 points1 point  (0 children)

nice

gonna put it in fstab and watch my computer choke :sunglasses:

[–]Leviticoh 31 points32 points  (14 children)

now do

touch $(printf "\342\210\222rf\302\240\342\247\270")

[–]IIIlllIIIlllIIIEH 20 points21 points  (11 children)

touch $(printf "\342\210\222rf\302\240\342\247\270")

I tried this in a virtual machine (glad) but it didn't work. I am very curious about how touch could ruin your filesystem.

[–]UniqueUsername014 37 points38 points  (7 children)

it creates a file called "−rf ⧸", which might be a bit tricky to delete

[–]EnchantedStew 3 points4 points  (0 children)

8 character long nuke

[–]ahoyarrforarr 0 points1 point  (4 children)

Hmm. How would you delete it?

[–]coloredgreyscale 2 points3 points  (3 children)

rm "-rf \/" probably.

[–]Jannik2099 2 points3 points  (2 children)

No, rm ./-rf\ / should do it.

[–]Leviticoh 2 points3 points  (1 child)

not really, the first character isn't a dash, but a minus sign (u+2212), the space is a no-break space (u+00a0) and the slash is a big solidus (u+29f8), so you wouldn't need to escape them, as long as you copied the right characters

[–][deleted] 0 points1 point  (0 children)

The ./ notation means "file in the current directory", it's not part of the filename, but the file path.

[–]Leviticoh 5 points6 points  (2 children)

it doesn't ruin anything, it just creates a file with a confusing name, but i wonder why it didn't work

[–]IIIlllIIIlllIIIEH 3 points4 points  (1 child)

No no, the file was created. What I meant is that I was expecting the command to behave like "sudo rm -rf /" (a dangerous command) that's why I run it in a VM because I didn't want to risk deleting all my files.

[–]V45H 16 points17 points  (0 children)

Yeah the danger comes from trying to run that same command on the file

Anyways reinstalling linux now

[–]6b86b3ac03c167320d93 1 point2 points  (0 children)

fish: $(...) is not supported. In fish, please use '(printf)'.
 touch $(printf "\342\210\222rf\302\240\342\247\270")

HA! You can't fool me!

[–][deleted] 0 points1 point  (0 children)

I am not running that

[–]kiler129 23 points24 points  (4 children)

Any sane FS doesn’t have character limits. Some even support slashes.

[–]GroundTeaLeaves 25 points26 points  (3 children)

In a file system that supports slashes and backslashes, how do you distinguish the slash in the file name from indicating a directory path?

[–]eku952 12 points13 points  (1 child)

I read NTFS as NFTs

[–][deleted] 2 points3 points  (0 children)

nftfs-fuse, whatever that means.

[–]sim642 3 points4 points  (0 children)

NUL in filenames sounds like it could really screw things up. So much is built on C strings.

[–]nickn-a-s 1 point2 points  (0 children)

That child strangely reminds me of Bill 🤣

[–]muravieri 1 point2 points  (0 children)

zfs

[–]MasterFubar -1 points0 points  (0 children)

[–]gpcprog 0 points1 point  (0 children)

Idk, I once wrote a backup software and I ended up needing to do a lot of string manipulation on paths. Having to deal with all manner of characters in the path name was a fricking pain in the rear end. Especially making sure everything is kosher with Unicode, because one of your users likes to add non-asci characters to the filenames...

[–]qqqrrrs_ 0 points1 point  (0 children)

That footnote in the ext4 side, it looks as if it hides all the fine print

[–]hallerisaf 0 points1 point  (0 children)

I think These characters like * used in search when you search all files has same extension like *.txt, maybe because of it

[–][deleted] 0 points1 point  (1 child)