Sorting Unix 'ls' command output by filesize
Updated: 6th December 2022Tags: ubuntu bash
ls -Slh
-S will sort files by size
-l long listing
-h will make the output human-readable
-r will reverse the output
ls -Slh
-S will sort files by size
-l long listing
-h will make the output human-readable
-r will reverse the output
Edit file ~/.bash_aliases
nano ~/.bash_aliases
For example I make alias a
. So when I press a
it will produce php artisan tinker
Here file ~/.bash_aliases
alias a='php artisan tinker'
Load aliases immediately
source ~/.bash_aliases
ps aux --sort=-%mem | awk 'NR<=800{print $0}'
ps -eo pid,lstart,cmd