从报错信息来看,cat的文件是一个二进制文件,不能直接grep 查找条件进行查找,需要修改为grep -a 查找命令。 有几个点需要解决: 1.什么是二进制文件? 2.为什么二进制文件不能直接grep 查找条件? 3.-a具体指的是什么?解决哪些问题?
Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines, overrides -n -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number...
Usage: cat [OPTION]... [FILE]... Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines, overrides -n -e equivalent to -vE -E, --show-ends display $...
Each file in Linux has a corresponding File Descriptor associated with it The keyboard is the standard input device while your screen is the standard output device “>” is the output redirection operator. “>>” appends output to an existing file “<” is the input redirection operator “>&...
catdisplays and concatenates files. It copies eachfileargument to the standard output (stdout). If you specify no files or specify a dash (-) as a file name,catreads the standard input (stdin). You can usecatwith the scrolling facility of the z/OS® UNIX TSO/E command to browse data...
[madonna@station madonna]$ cat --help Usage: cat [OPTION] [FILE]... Concatenate FILE(s), or standard input, to standard output. -A, --show-all equivalent to -vET -b, --number-nonblank number nonblank output lines -e equivalent to -vE -E, --show-ends display $ at end of each...
cat命令属于文件管理,用于连接文件并打印到标准输出设备上,cat经常用来显示文件的内容,注意,当文件较大...
例如,如果当前目录下有三个文件:file1.txt、file2.txt和file3.txt,我们可以使用以下命令将它们复制到另一个目录中: 代码语言:txt 复制 cp file{1..3}.txt /path/to/destination/ 上述命令中的{1..3}表示一个范围,它会被扩展为1 2 3,因此实际执行的命令相当于: 代码语言:txt 复制 cp file1.txt file...
with-filename print file name with output lines-h, --no-filename suppress the file name prefix on output--label=LABEL use LABEL as the standard input file name prefix-o, --only-matching 只显示匹配PATTERN 部分的行-q, --quiet, --silent 不显示所有常规输出--binary-files=TYPE 设定二进制...
--label=LABEL use LABEL as the standard input file name prefix -o, --only-matching 只显示匹配PATTERN 部分的行 -q, --quiet, --silent 不显示所有常规输出 --binary-files=TYPE 设定二进制文件的TYPE 类型; TYPE 可以是`binary', `text', 或`without-match' ...