Linux File Command-cat command explanation

Source: Internet
Author: User

Overview: View file contents, connect files, redirect output to a file
1. View entire file 2, cat > filename Create file 3, merge output to file

1. View files (single or multiple)

Cat Demo.txt

2. Create a file file (EOF is a starting and ending character can be random)

Cat >abc.txt <<EOF> good luck> good dog> good> EOF

Cat Abc.txtgood Luckgood Doggood

3. Merge output to File

# creating Files Cat1.txtcat >cat1.txt <<eofcat1good Luckperson
Eof
# creating Files Cat2.txtcat >cat1.txt <<eofcat1good luckpersoneof
# Merge to Cat.txtcat cat1.txt cat2.txt > Cat.txt
# View the merged files cat Cat.txt

Linux File Command-cat command explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.