ls - default arguments to save time
Solution 1:
Look up the alias command.
alias list='ls -l'
If you want this to "stick" add it to your .bashrc
file.
Solution 2:
The normal pattern is to have ll
aliased to this.
In Ubuntu 10 it is already done.
Here is an extract from the default .bashrc
:
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
My .bashrc
looks like this:
alias l='ls --color=always -F'
alias ll='ls --color=always -F -lh'
alias L='ls --color=always -F -L'
alias LL='ls --color=always -F -lh -L'
alias la='ls --color=always -F -a'
alias lla='ls --color=always -F -lh -a'
alias l.='ls --color=always -F -A --ignore=\*'
alias ll.='ls --color=always -F -lh -A --ignore=\*'
Note: changing the meaning of an existing command is considered dangerous, e.g., alias ls='ls -l'
. It can change the behavior of (badly written, though most) scripts.
Solution 3:
You can use the alias
command.
alias ls="ls -l"
You can either type this out in a shell session, or you can put it in a file to be sourced, a good one would be ~/.bashrc
. If you run it in a shell session, the alias will exist until you exit the shell. If you put it in your a file and source it each time the shell is run (such as by simply putting it in ~/.bashrc
), the alias will be created each time you open a shell.
Solution 4:
put
alias ls="ls -l"
in your ~/.bashrc file.