以下哪个命令可以搜索文件中特定字符串的内容()
A: find
B: file
C: locate
D: grep
A: find
B: file
C: locate
D: grep
D
举一反三
- ()命令是在文件中搜索与指定字符串匹配的行并打印到终端。 A: which B: find C: locate D: grep
- 在给定文件中查找与设备条件相符字符串的命令为() A: find B: locate C: grep D: where
- Linux中用于查找文件的命令有( ) A: find B: lookup C: locate D: grep
- Linux中用于查找文件的命令有( ) A: find B: search C: locate D: grep
- 以下选项中,_______的功能是在文件file中查找显示所有以"*"开头的行。 A: find \* file B: wc -l * <; file C: grep -n * file D: grep '^\*' test.txt
内容
- 0
已知当前目录中只有三个文件file1 file2 和file3,命令()能够从这些文件中查找包含字符串hello的行。 A: grep hello file1 file2 file3 B: grep hello file* C: grep hello file D: grep hello *
- 1
Linux系统中,在给定文件中查找与设定条件相符文件内容字符串的命令为: A: grep B: gzip C: find D: sort
- 2
下列哪个命令用于在文本文件中查找字符串 A: ls B: grep C: find D: pwd
- 3
以下哪条命令搜索用户的.bash_history文件以确定该用户是否使用过sudo命令? A: find /home -name "bash_history" | grep sudo B: find /home -name ".bash_history" | xargs grep sudo C: find /home/.bash_history | xargs grep sudo D: find /home -type history | xargs grep sudo
- 4
关于常见的查找命令,以下说法正确的是:( ) A: find命令是在硬盘中搜索,只要文件在系统中存在,就能找到 B: find命令是在内存中搜索,只要文件在系统中存在,就能找到 C: locate命令是通过后台数据库中按文件名搜索,搜索速度比find更快 D: 使用locate查找刚创建的新文件,可能查找不到