Reputation: 673
I have a command in bashrc
alias ls="ls -l"
Now I want the normal behavior of ls(i.e. only file names) I am trying
alias ls_normal="ls"
When I execute ls_normal, it's calling ls, which is ls -l.
So how do I get the default behavior of ls, after I changed it through alias? Is it possible to save it?
Upvotes: 1
Views: 44
Reputation: 241858
Calling \ls
, 'ls'
, "ls"
, or using the full path to ls
all prevent alias expansion.
Upvotes: 3
Reputation: 6384
The best way is to call it with a backslash:
alias ls_normal='\ls'
Upvotes: 2