What is the easiest way to execute the original ls?

You wish to execute the ls command, but it appears to be aliased. What is the easiest way to execute the original ls?

You wish to execute the ls command, but it appears to be aliased. What is the easiest way to execute the original ls?

Answer: ls

Explanation/Reference:

see http://en.wikipedia.org/wiki/Alias_%28command%29#Overriding_aliases

In Unix shells, if an alias exists for a command, it is possible to override the alias by surrounding the command with quotes or prefixing it with a backslash. For example, consider the following alias definition:
alias ls=’ls -la’
To override this alias and execute the ls command as it was originally defined, the following syntax can be used:
‘ls’
or
ls



Leave a Reply 1

Your email address will not be published. Required fields are marked *


kuemmel

kuemmel

Hey admin..
You´ve forgot the Backslash before ls and set the wrong quotes in the first one..
Correct Answers: \ls or ‘ls’