linux < >difference

(*-*)浩
Release: 2019-11-04 09:39:23
Original
2563 people have browsed it

linux < >difference

##Difference:

> Overwrite output to text (Recommended learning: linuxOperation and Maintenance)

< Use the following file as the input of the previous command

Okay, let’s experiment first, first create a The test.txt file is empty, and then we use the cat command to do this experiment

touch test.txt
Copy after login

Let’s try cat < a The following error will appear, indicating that this is followed by a file or directory

[root@oracle1 test]# cat < a
bash: a: No such file or directory
Copy after login

So what can be in the file? First write aaa into test.txt and then execute cat < test.txt. It seems to be no different from directly cat test.txt

[root@oracle1 test]# cat > test.txt 
aaa
^C
[root@oracle1 test]# cat test.txt 
aaa
[root@oracle1 test]# cat < test.txt 
aaa
Copy after login

The above is the detailed content of linux < >difference. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template