※ less, more, head, tail, tee, wc, mail 都是可以接受 standard input 的管線命令
# ls -l /usr/bin | less
# ls | wc -l > /tmp/how-many-files
# ls -t | head -n 10 > /tmp/ten-last-changed-files
# ls -l | tee /tmp/saved-output # ls -l | tee /dev/pts/0 mail -s subject tee 會同時將資料流分送到檔案與螢幕
Editing files with Vim
‧ Press i to enter insert mode ‧ Press Esc to return to command mode ‧ Press u to undo mistaken edits on the current line ‧ Press x to delete a selection of text ‧ Press y to yank(copy) the selection ‧ Press p to put(paste) the selection ‧ Enter :w to write(save) the file and remain in command mode for more editing ‧ Enter :wq to write the file and quit Vim ‧ Enter :q! to quit Vim, but discard all file changes since the last write