And if he’s on / (root) on most common distros, there won’t be any dirs with . (dot) in their name. Unless this matches the dot from the cwd, in which case this is the same as “rm -rf /“? Now I’m curious, I don’t often perform operations on the cwd using dot.
gregor@raspberrypi:~ $ ls
bridge navidrome seed traefik
gregor@raspberrypi:~ $ ls *.*
ls: cannot access '*.*': No such file or directory
gregor@raspberrypi:~ $ cat *.*
cat: '*.*': No such file or directory
Right, so then if asterisk wildcards don’t match on . and … then, in most common distros where there is no dot in any of the top level dirs in /, “rm -rf *.*” in the top level / dir is basically harmless and likely a noop.
Technically, it says he’s in the ~ directory, which would usually be /home/god, but even in there there aren’t usually any directories/files with a dot.
DOS user detected! In linux you don’t need
*.*, you can just use*Maybe he wanted to remove only files with a dot in the name
And if he’s on / (root) on most common distros, there won’t be any dirs with . (dot) in their name. Unless this matches the dot from the cwd, in which case this is the same as “rm -rf /“? Now I’m curious, I don’t often perform operations on the cwd using dot.
At least bash doesn’t seem to match it…
gregor@raspberrypi:~ $ ls bridge navidrome seed traefik gregor@raspberrypi:~ $ ls *.* ls: cannot access '*.*': No such file or directory gregor@raspberrypi:~ $ cat *.* cat: '*.*': No such file or directoryRight, so then if asterisk wildcards don’t match on . and … then, in most common distros where there is no dot in any of the top level dirs in /, “rm -rf *.*” in the top level / dir is basically harmless and likely a noop.
So OP is wrong.
Technically, it says he’s in the
~directory, which would usually be/home/god, but even in there there aren’t usually any directories/files with a dot.Going to point out that not only is *.* unnecessary, but he’s in ~ (home) so assuming it even worked he just deleted his home.
maybe his $PS1 just happens to have a tilde in it
Well, guess that’s it for heaven
God programmed the universe into DOS
This explains a lot.
well, depending on your shell
Which shell interprets * as everything before extension?
Well I’m not necessarily commenting on the
*.*but*will skip .files in bash.I think *. * also skips them
*.*will likely expect a file named*.and then delete any file globbed, but still leave dotfiles. At least in bash.In my shell it would just error at me and then I’d be mad
fishdoesn’t work likebashin this specific case