将数据从一个文件添加到另一个文件 [英] Prepend data from one file to another

查看:123
本文介绍了将数据从一个文件添加到另一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将数据从file1.txt前置到file2.txt?

How do I prepend the data from file1.txt to file2.txt?

推荐答案

以下命令将两个文件合并为一个文件

The following command will take the two files and merge them into one

cat file1.txt file2.txt > file3.txt; mv file3.txt file2.txt

这篇关于将数据从一个文件添加到另一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆