简体   繁体   English

除了一个之外的 Cat 文件

[英]Cat files except one

I have split a large file into many splits, then I created an md5sum for all the files.我已将一个大文件拆分为多个拆分,然后为所有文件创建了一个 md5sum。 My question, how can i merge the files except the md5 file?我的问题,如何合并除 md5 文件之外的文件? Here is an example:下面是一个例子:

  /home/files/file.iso.00
  /home/files/file.iso.01
  ..
  /home/files/file.iso.52
  /home/files/file.iso.md5

I tried the following but it didn't work:我尝试了以下但没有奏效:

cat file.iso.[[:digit:]] >> file.iso

Many thanks in advance.提前谢谢了。

As you are the one having created the MD5 checksum file, why did you call it /home/files/file.iso.md5 ?由于您是创建 MD5 校验和文件的人,为什么将其/home/files/file.iso.md5
If you call it /home/files/file.md5 (without the iso part), you won't have a problem anymore.如果你叫它/home/files/file.md5 (没有iso部分),你就不会再有问题了。

Found the answer:找到答案:

find . -regex '.*\.[0-9][0-9]' -exec cat {} \; >> file.iso

I don't believe there is a way to filter files using cat.我不相信有一种方法可以使用 cat 过滤文件。 But if you find the files then cat them, it should work just fine.但是,如果您找到文件然后将它们分类,它应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM