Title here
Summary here
預設按字符嘅編碼排序,唔係數值。
sort - sort lines of text files
sort -r file
sort -n file
月份格式:Jan
、Feb
、Mar
。
sort -M file
預設按(連續嘅)空格或者制表符分隔。
sort -k 1 file
-k
下標由 1 開始,第 3 列係用戶 ID。
sort -t ':' -k 3 -n /etc/passwd
sort -f file
sort -u file
sort - sort lines of text files
alias -p
可以睇命令係咪內部命令,內部命令同 Shell 編譯成一體,同外部命令唔同,唔使子進程執行。
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
唔使一個一個睇。
readlink -f /bin/vim
/usr/bin/vim.basic