Show only the lines in a file containing a given substring: grep substring file
Case insensitive search: grep -i substring file
Showing all the lines but the ones containing a substring: grep -v substring file
Search through all the files in a directory: grep -r substring dir
Sort lines in a given file: sort file 
Sort lines, only display duplicate ones once: sort -u file (unique)

這篇文章有幫助嗎? 0 Users Found This Useful (0 Votes)