如何在 Linux 中从 shell 将一个文件附加到另一个文件? [英] How to append one file to another in Linux from the shell?

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

问题描述

我有两个文件:file1file2.如何将 file2 的内容附加到 file1 以便 file1 的内容保持进程?

I have two files: file1 and file2. How do I append the contents of file2 to file1 so that contents of file1 persist the process?

推荐答案

使用 bash 内置重定向 (tldp):

cat file2 >> file1

这篇关于如何在 Linux 中从 shell 将一个文件附加到另一个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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