44问答网
所有问题
linux怎么将文件内容添加到另一个文件的前面
如题所述
举报该问题
推荐答案 推荐于2017-12-15
使用重定向就可以了,比如有a,b两个文件,你需要将a文件内容追加到b文件的前面,实际就是b文件的内容放到a文件的后面,命令:cat b >> a
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://44.wendadaohang.com/zd/Y3VVDDVKW6WZWVY63KR.html
其他回答
第1个回答 2020-03-10
cat file1 file2 > temp
cat temp > file2
将file1的内容添加到file2的开头,temp是中间文件
第2个回答 2016-12-12
cat a.txt > b.txt
相似回答
大家正在搜
相关问题
linux中怎么把文本中前面带空格的一行追加到,前一行,追加...
linux怎么将一个文件移动到另一个目录下
shell中如何在文件开头插入行
linux中文件前加点是什么意思
在LINUX中,如何把2个文件中的内容合到另一个文件中去?
linux写脚本,需要ls只显示前10个文件,怎么实现?
在linux中如何查看前一屏幕的内容
linux管道命令后用什么可以把前面的输出存成文件