this post was submitted on 06 Sep 2024
598 points (90.2% liked)

linuxmemes

20723 readers
1716 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 1 week ago (14 children)

you can also use basically anything that's not / in a file name as well, it's pretty based. Meanwhile on windows you have to use SMB mappings if you don't want your directory structure to self immolate, what a good operating system.

[–] [email protected] 4 points 1 week ago (7 children)

I think you might even be able to get away with /s if you escape them properly in the filename.

[–] [email protected] 4 points 1 week ago* (last edited 1 week ago) (1 children)

Just tried. It processes the escape first and then finds the path with it. Essentially, making it look into a directory made by the characters before the \/.

The above was when I tried:

echo "asd" > asd\/dsa

But then I tried using Dolphin (GUI File Browser) to make a file and:

❯ ls
 1   2   3   4  'asd\⁄sad.txt'
❯ ls
1  2  3  4  asd⁄sad.txt

In the first one, the backslash is not the escape character, but part of the text.

Turns out Dolphin just replaces the forward slash with U+2044 "Fraction Slash" character, hence, not requiring any escape. I'd call that cheating, but it works well.

[–] [email protected] 2 points 1 week ago* (last edited 1 week ago) (1 children)

Turns out Dolphin just replaces the forward slash with U+2044 “Fraction Slash” character, hence, not requiring any escape. I’d call that cheating, but it works well.

called it, i knew someone would use illegal characters eventually.

[–] [email protected] 1 points 1 week ago* (last edited 1 week ago) (1 children)

I would have a problem if a terminal app were to do something like this, but for GUI apps, it is expected for them to make stuff easier.
And I feel like, if you were to use a slash in a file name, it would most probably be either an "or" slash or a fraction slash, so the substitution is fine in my books.

illegal characters

Not sure about calling it that, considering it is a standard UTF-8 character. (0x2044 in UTF-16)

[–] [email protected] 2 points 1 week ago

I would have a problem if a terminal app were to do something like this, but for GUI apps, it is expected for them to make stuff easier. And I feel like, if you were to use a slash in a file name, it would most probably be either an “or” slash or a fraction slash, so the substitution is fine in my books.

it's close enough, i generally consider an "illegal" character a non typable character. Especially these alt characters that are visually hard to distinguish from others such as the forward slash for example, i believe this was the same character used for a handful of somewhat clever phishing scams.

Seems like it's fair enough to me.

load more comments (5 replies)
load more comments (11 replies)