14,958
edits
No edit summary |
|||
| Line 30: | Line 30: | ||
Search text in a file | Search text in a file | ||
* grep command for multiple files: {{kbd | key=<nowiki>grep -ir "string to search" /path/to/directory</nowiki>}} or {{kbd | key= grep ''keyword'' /path/to/file}} ({{Linux}}) | * grep command for multiple files: {{kbd | key=<nowiki>grep -ir "string to search" /path/to/directory</nowiki>}} or {{kbd | key= grep ''keyword'' /path/to/file}} ({{Linux}}) | ||
* (1)[http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (2)press {{kbd | key= /keyword}} ({{Linux}}) | * vim: (1)[http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (2)press {{kbd | key= /keyword}} ({{Linux}}) | ||
* cat & grep: {{kbd | key= cat /path/to/file <nowiki>|</nowiki> grep ''keyword''}} ({{Linux}}) keyword is case sensitive | * cat & grep: {{kbd | key= cat /path/to/file <nowiki>|</nowiki> grep ''keyword''}} ({{Linux}}) keyword is case sensitive | ||
[[Desktop_search#Search_text_in_files| Search text in files]]<ref>[http://linux.vbird.org/linux_basic/0320bash.php#col 鳥哥的 Linux 私房菜 -- 學習 bash shell] </ref> | [[Desktop_search#Search_text_in_files| Search text in files]]<ref>[http://linux.vbird.org/linux_basic/0320bash.php#col 鳥哥的 Linux 私房菜 -- 學習 bash shell] </ref> | ||