课程: Linux: System Information and Directory Structure Tools
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Searching in files with grep - Linux教程
课程: Linux: System Information and Directory Structure Tools
Searching in files with grep
- [Instructor] The most efficient way of searching for data in a file is to use grep. The syntax for grep is grep, followed by options and then the search criteria, usually placed within single quotes to protect the text from being processed by the shell, and lastly, the name of the file to search through. The other option is to pipe the output of a command into grep, which I often do. Grep has many options, but the ones I like to use the most are -i for case insensitive search, - v for inverted search, which shows the opposite of the search criteria, - c to return the number of lines that matched, useful for items and log files, - o to show only characters that match, normally, grep returns the entire line, - r to recursively search through all files on a directory, useful for finding items and configuration files in /etc, and lastly, -E to use extended regular expressions. Grep supports basic and extended…
内容
-
-
-
-
-
-
(已锁定)
What is a file?5 分钟 3 秒
-
(已锁定)
Getting information about files4 分钟 45 秒
-
(已锁定)
About extended attributes3 分钟 38 秒
-
(已锁定)
Getting extended attributes3 分钟 55 秒
-
(已锁定)
Reading files5 分钟 24 秒
-
(已锁定)
Searching in files with grep7 分钟 25 秒
-
(已锁定)
Archiving files with tar and cpio9 分钟 10 秒
-
(已锁定)
Compressing files3 分钟 21 秒
-
(已锁定)
-
-