Title here
Summary here
Sorts lines of text files by default, non-numeric.
sort - sort lines of text files
sort -r file
sort -n file
Month format: Jan
, Feb
, Mar
.
sort -M file
Default is separated by (consecutive) spaces or tabs.
sort -k 1 file
-k
index starts from 1, the 3rd column is the user ID.
sort -t ':' -k 3 -n /etc/passwd
sort -f file
sort -u file
sort - sort lines of text files
alias -p
Can view if a command is an internal command, internal commands are compiled into the shell, different from external commands, no subprocess execution is required.
type cd
cd is a shell builtin
type ps
ps is hashed (/usr/bin/ps)
type -a echo
echo is a shell builtin
echo is /usr/bin/echo
echo is /bin/echo
type ll
ll is aliased to `ls -alF'
type -a ls
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls
readlink - print resolved symbolic links or canonical file names
No need to look one by one.
readlink -f /bin/vim
/usr/bin/vim.basic