What is Nostr?
b9AcE #NoEdits /
npub14hy…jycy
2023-05-03 19:07:47
in reply to nevent1q…75mj

b9AcE #NoEdits on Nostr: A devious feature of the BASH-shell and related on UNIX(/Linux) systems is the ...

A devious feature of the BASH-shell and related on UNIX(/Linux) systems is the "alias"-command.

Many are e.g. used to defaults like being able to type "ll"+<enter> to get a "long listing" of the files in a directory (later often idiotically renamed "folder" for confusion),
whilst that usually actually just like a "shortcut" for the command "ls" ("list sources", because UNIX was built by programmers, wanting to list their programming "source files"),
buuut, that "shortcut" can also be used to e.g. make entering a simple command like "ls" do unexpected things like remove ("rm") files and directories.
This is the power of the "alias"-command, which just reroutes whatever you wrote on the command-line to do something else.

In the case of the previous "ll", a common way it was set in you login-initialization files is "alias ll='ls -al'",
but that cooould be changed by someone devious to run actually any other command.

SO, if you want to be safe, you can tell your command-line to run the command "ls" with its full path "/bin/ls", but that CAN be caputured too, so you can escape that by the "escape"-character backslash,
so now it becomes "\/bin/ls" for full safety.

If it's a command built into the shell, you instead start by for example "\builtin alias la='\/bin/ls -halF --color=force'".
:-)
Author Public Key
npub14hy0uajlrmsmt4ep5ex7ayqxyaamq0rqsf8yt4h4crmcjay9l4xsaqjycy