What's the difference between ls and la? Why do they give the same output?
la
is an alias to ls -A
defined in ~/.bashrc
file in Ubuntu.
It only shows the same output if you have no hidden files or directories.
ls -A
shows hidden files and directories.
la
is defined as an alias in Ubuntus ~/.bashrc
file together with a few others. la
is simply an ls -A
as you can see in the following snippet from the ~/.bashrc
# this alias is defined earlier to grant colored output
alias ls='ls --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias li='ls -lF'
When in doubt, type la
.
Bash output:
la is aliased to `ls -la'
Fish output:
la is a function with definition
function la --description 'List contents of directory, including hidden files in directory using long format'
ls -lah $argv
end