Timeline for answer to Run a command that is shadowed by an alias by Mikel
Current License: CC BY-SA 3.0
Post Revisions
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 21, 2021 at 16:46 | comment | added | zpangwin |
@ Mikel, you are absolutely correct, my bad. I had thought it was just a binary bc fedora-33 has a binary at /usr/bin/command. After looking at docs and running type command from within each distro separately, it is indeed a builtin on both systems despite fedora also having a binary. I also discovered another method which is not portable. On Fedora, it has GNU which v2.21 and that supports the options --skip-alias and --skip-functions. Unfortunately, LM 20 (and presumably Ubuntu 20/Debian 10) are using a different version of which that does NOT support these (or even --version)
|
|
| Apr 21, 2021 at 5:19 | comment | added | Mikel |
@zpangwin It's not a regular binary so find won't find it. bash manual POSIX
|
|
| Apr 20, 2021 at 19:57 | comment | added | zpangwin |
note: command works great when its there (such as on fedora) but i was seeing that some distros do not appear to have it. i didn't see it after running sudo find -type f -iname 'command' under the bin or usr dirs on my linux mint partition (searching from fedora). if writing x-distro scripts, this may not be the best option
|
|
| Dec 18, 2018 at 9:52 | comment | added | Dennis | @JoelFan I'd much rather have the few extra characters and have my scripts be easy to follow and work for everyone. Rather than a cryptic slash which is not intuitive, easy to miss, not well documented, and doesn't work for bypassing functions. | |
| Jun 17, 2015 at 18:48 | comment | added | Dejay Clayton | The backslash feature is not secure. While it provides protection against similarly-named aliases, it does not provide protection against similarly-named functions. | |
| May 25, 2012 at 16:33 | history | edited | Mikel | CC BY-SA 3.0 |
ksh93 expands aliases after command by default, defeating the purpose!
|
| May 25, 2012 at 16:27 | comment | added | Mikel | @STATUS_ACCESS_DENIED Thanks for defending my answer. But bash has many quirks, so provided the backslash method is a feature and not a bug, I think it's also a good answer. In fact it's documented in the bash aliases reference. | |
| May 25, 2012 at 16:15 | history | edited | Mikel | CC BY-SA 3.0 |
deleted 136 characters in body
|
| S May 25, 2012 at 14:46 | history | suggested | 0xC0000022L | CC BY-SA 3.0 |
also mentioning builtin, for completeness
|
| May 25, 2012 at 13:23 | comment | added | Levon | @STATUS_ACCESS_DENIED ah .. good point re the tag, didn't notice it. Glad the \ works (quirk or not) .. that'll come in useful. | |
| May 25, 2012 at 13:22 | review | Suggested edits | |||
| S May 25, 2012 at 14:46 | |||||
| May 25, 2012 at 13:21 | comment | added | 0xC0000022L |
@Levon: the question was asked for bash, though ;) ... see the tags. And the reason the other one works is a quirk, nothing else.
|
|
| May 25, 2012 at 13:15 | comment | added | Levon | @STATUS_ACCESS_DENIED This also doesn't work with tcsh (and therefore presumably not with csh either). The `\` method does | |
| May 25, 2012 at 13:12 | comment | added | JoelFan | Because it adds 8 times the number of characters as the backslash method | |
| May 24, 2012 at 22:28 | history | edited | Mikel | CC BY-SA 3.0 |
added 71 characters in body
|
| May 24, 2012 at 22:22 | history | answered | Mikel | CC BY-SA 3.0 |