列出 /var 下以 l 開頭、含數字、並以小寫字母結尾的項目:
ls -d /var/l*[0-9]*[[:lower:]]

列出 /etc 下以數字開頭且不以數字結尾的項目:
ls -d /etc/[0-9]*[^0-9]

列出 /etc 下以非字母開頭、後面接字母的項目:
ls -d /etc/[^[:alpha:]][[:alpha:]]*

列出 /etc 下以 m 開頭且不以數字結尾的項目:
ls -d /etc/m*[^[:digit:]]

列出 /etc 下所有 .d 結尾的項目:
ls -d /etc/*.d

列出 /etc 下以 m、n、r、p 開頭且以 .conf 結尾的項目:
ls -d /etc/[mnrp]*.conf

把 /etc/issue 轉大寫並保存:
cat /etc/issue | tr 'a-z' 'A-Z' > /tmp/issue.out

把登入者資訊轉大寫:
who | tr 'a-z' 'A-Z' > /tmp/who.out

寄送說明郵件給 root:
echo "Hello, I am $HOSTNAME, the system version is here, please help me check it thanks! `cat /etc/redhat-release`" | mail -s help root

把 /root 檔案列表顯示成一行:
ls -a /root/ | tr '\n' '\ '

只保留字串中的數字與空格:
echo "xt.,l 1 jr#!$mn2 c*/fe3 uz4" | tr -cd '[:digit:] '

把 PATH 每個目錄顯示在獨立一行:
echo $PATH | tr ':' '\n'

刪除指定檔案的空行:
cat ff1 | tr -s '\n'

把檔案中每個單詞顯示在獨立一行:
cat test | tr -cs '[:alpha:]' '\n'

建立 testuser:
useradd testuser -u 1234 -g bin -G root,ftp -s /bin/csh -d /testdir/testuser

修改 testuser:
usermod -u 4321 -g root -G nobody -l test -d /home/test -m testuser