Im constantly doing "ls -ahl" whenever I want to list what is in the directory. Is there a way for me to make -ahl the default args passed when I do "ls" or should I just create an alias like "alias lsa=ls -ahl" in bash_profile?
Simply do alias ls='ls -tU' and in the future all ls commands would be replaced by ls -tu . This solution persists until your close your terminal window, but you can always add it to a startup script (for example, .
You can stop the output by pressing Ctrl + C (like it's the case with most programs inside the linux shell).
The default output of the ls command shows only the names of the files and directories, which is not very informative.
You could just alias ls itself. So something like:
alias ls='ls -ahl'
Set an alias
in your ~/.bash_profile
file.
alias ls="ls -ahl"
A couple of common aliases that I use all the time are:
alias ll="ls -lh --color" alias l="ls -1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With