由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - how to copy one file into another?
相关主题
how to rename files -- waiting on line命令输出里的文件名空格在 make 里面怎么保留?
html给php传文件的问题,求解!root file system 和kernel有什么不一样吗?
请问怎么把两个行数相等的文件合并起来?怎么找到所有的duplicate files?
please help: using 'cat' to merge large text files in linux请问ubuntu下面有没有类似windows 的disk cleanup and defragme
如何对linux文件夹进行比对? (转载)为什么bash file执行的结果与直接在命令行执行的结果不一样
best linux file manager?how to use sed command to replace ' into * ?
how do I remove this file???请问有好的vim cvs plugin 吗?
rpm一问how to tar files in a folder whose last modified days from 7 days ago to now?
相关话题的讨论汇总
话题: file话题: copy话题: another话题: 512k话题: files
进入Linux版参与讨论
1 (共1页)
l*****u
发帖数: 12114
1
I have file A.txt with size 1M and file B.txt with size 512k, Is there any
linux command that can copy B.txt to A.txt's first 512K?
h***r
发帖数: 726
2
if your files are text files,
combine wc, head/tail and cat, you will get it.

【在 l*****u 的大作中提到】
: I have file A.txt with size 1M and file B.txt with size 512k, Is there any
: linux command that can copy B.txt to A.txt's first 512K?

l*****u
发帖数: 12114
3
what if they are not plain text files? I mean, is there any way to replace
the first N bytes of a file with content from another file?

any

【在 h***r 的大作中提到】
: if your files are text files,
: combine wc, head/tail and cat, you will get it.

w********e
发帖数: 557
4
dd
l*****u
发帖数: 12114
5
比如说 A.dat 大小 1500000 bytes, B.dat 大小 1000000 bytes, 怎么把 A.dat 的前
1000000 bytes写成B.dat的数据? 能给个dd的例子?

【在 w********e 的大作中提到】
: dd
w********e
发帖数: 557
6
dd if=B.dat of=A.dat bs=1 count=1000000 conv=notrunc
Actually cat handles binary files too. So you can also cat them and then
split it.
N**D
发帖数: 10322
7
perl

【在 l*****u 的大作中提到】
: I have file A.txt with size 1M and file B.txt with size 512k, Is there any
: linux command that can copy B.txt to A.txt's first 512K?

j*a
发帖数: 14423
8
good.原来notrunc是这个意思.

【在 w********e 的大作中提到】
: dd if=B.dat of=A.dat bs=1 count=1000000 conv=notrunc
: Actually cat handles binary files too. So you can also cat them and then
: split it.

1 (共1页)
进入Linux版参与讨论
相关主题
how to tar files in a folder whose last modified days from 7 days ago to now?如何对linux文件夹进行比对? (转载)
ubuntu下怎么sync and backup files ?best linux file manager?
another questionhow do I remove this file???
huge .xsession-error filerpm一问
how to rename files -- waiting on line命令输出里的文件名空格在 make 里面怎么保留?
html给php传文件的问题,求解!root file system 和kernel有什么不一样吗?
请问怎么把两个行数相等的文件合并起来?怎么找到所有的duplicate files?
please help: using 'cat' to merge large text files in linux请问ubuntu下面有没有类似windows 的disk cleanup and defragme
相关话题的讨论汇总
话题: file话题: copy话题: another话题: 512k话题: files