Fork me on GitHub
#off-topic
<
2024-03-07
>
teodorlu11:03:56

is it possible to create a folder named literally .? (not implying that this is a good thing to do or that I need it, just … curious. mkdir . claims that . exists, but I want a new folder in . with the name ..)

maleghast11:03:00

I am pretty sure it's impossible as . is the equivalent of here in POSIX systems... YMMV

teodorlu11:03:19

Yup, which is why I’m curious!

maleghast11:03:46

From what I can gather with a quick Googling it's not possible.

👍 1
teodorlu11:03:51

$ mkdir --file
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory_name ...
$ # but we can get around these rules!!!
$ mkdir -- --file
$ ls
--file dot

teodorlu11:03:09

OK, in that case I may have to give up 😞

maleghast11:03:19

I guess that if you really wanted to be able to do it you could consider forking a linux distribution and making some very low level changes so that another character, say ^ means here and then you could use . to your heart's content, but honestly I would not know where to start.

🔥 1
teodorlu11:03:25

So … If I create a folder named . on this custom linux distribution, tar it into an archive and extract on my normal computer, it would … presumably crash on trying to extract?

maleghast11:03:31

Almost certainly, yes

👍 1
teodorlu12:03:01

I would love to say that I am going to write a custom linux distribution to try this out, but I am afraid I won’t be able to do that today. Thanks for the replies --- I didn’t imagine that this was an OS-wide assumption, I just assumed it was a bash/zsh-thing!

maleghast12:03:01

No worries - I think that you would need a custom shell as well, but I think it's baked into the OS; I could be wrong about that.

👍 1
thomas12:03:53

if you have a folder named . you can't do something like ./run.sh if run.sh is in the current directory... and that is the way to do. and thinking about, you already have a dir names . the one you are in. so you can't create another one with that name.

👍 1
teodorlu12:03:46

Right, that makes sense.

thomas12:03:21

maybe on some really obscure non posix file system you can get some thing different... but then you'll have to run it on a OS/390, OS/400, HP3000, CTOS or any other obscure OS maybe?

1
teodorlu12:03:40

would this be impossible on Windows too?

thomas12:03:49

don't think so... as I can remember you can do cd.. on a window/dos terminal.. so I suspect . to be there as well

👍 1
thomas12:03:04

so yes .;)

👍 1
😁 1
andy.fingerhut03:03:30

I am fairly sure that on Unix/Linux, "." is effectively automatically created in every directory when the directory is created, and cannot be renamed. Also ".."

👍 1
andy.fingerhut03:03:09

I would be very very wary if you somehow renamed them of what kinds of software would go horribly wrong afterwards.

😄 1
andy.fingerhut03:03:56

The assumption of what those names mean is deeply embedded in lots of places.

👍 1
Emanuel Rylke06:03:38

If all you want is a tar file with a folder named . there is no need to create a custom linux distro. The .tar file format is presumably simple enough that you can just write a small program to create that, maybe even a hex editor suffices.

1
teodorlu07:03:03

Good point. Then I could try extract it and see what happens :thinking_face:

vemv12:03:06

I was thinking of replacing a :txn-fn / :rollback-fn name pair (for a Saga-like pattern) for a shorter name pair that, fun requirement, should have the same character length (so that map alignment is always produced). Any cool/creative suggestions?

vemv12:03:27

Best I could think of: try/nvm act/zap

kdj0012:03:01

fwrd/back done/oops

1
Noah Bogart13:03:27

tfn/rfn would still map to transaction/rollback fn

💡 1
thomas13:03:26

Yesss/oh-fck

😂 5
vemv14:03:44

ok/ko nice suggestions. Team humans 1 - Team genai 0 (they gave me ludicruous non-solutions)

vemv14:03:20

::arrow_up: / ::arrow_down: also happen to be keywords 🌀

😂 3
thomas14:03:52

::white_check_mark: /::boom:

Evan14:03:03

giterdone/whoanelly

😂 2
1