Home > Operation and Maintenance > Linux Operation and Maintenance > How to copy the contents of one file to the end of another file in Linux

How to copy the contents of one file to the end of another file in Linux

王林
Release: 2019-11-22 11:04:08
Original
3979 people have browsed it

How to copy the contents of one file to the end of another file in Linux

Problem description:

For example, the file content of 11 is:

hello
Copy after login

22’s file content is:

world
Copy after login

Copy the content of file 22 to the end of file 11. The effect of file 11 is:

hello
world
Copy after login

Solution:

cat 22 >> 11
Copy after login

cat /dev/null > a.txt
Copy after login
linux tutorial

The above is the detailed content of How to copy the contents of one file to the end of another file in Linux. 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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template