Home  >  Article  >  Operation and Maintenance  >  linux < >difference

linux < >difference

(*-*)浩
(*-*)浩Original
2019-11-04 09:39:232542browse

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

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

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

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

Statement:
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