Sunday, May 5, 2024
69
rated 0 times [  69] [ 0]  / answers: 1 / hits: 57840  / 2 Years ago, sat, april 23, 2022, 3:08:57

I have set some aliases in my .bashrc file and for some reason one of them does not behave as expected.



Since I don't remember the exact command assigned to that alias, I would like to see the command to find out what's wrong.



Except the obvious opening the .bashrc file to see it, is there a command that just echos the command assigned to that alias?


More From » command-line

 Answers
5

Instead of using grep, you can just type alias aliasname to see what an alias is set to.



For example, alias ls will return ls='ls --color=auto'.



Also take a look at the type and whence commands, which return more detailed information about utilities, including executable files in your path, shell built-ins, aliases, and shell functions.


[#32710] Sunday, April 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rowbris

Total Points: 419
Total Questions: 122
Total Answers: 101

Location: Norway
Member since Mon, May 23, 2022
2 Years ago
;