简体   繁体   中英

Cat files except one

I have split a large file into many splits, then I created an md5sum for all the files. My question, how can i merge the files except the md5 file? 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 ?
If you call it /home/files/file.md5 (without the iso part), you won't have a problem anymore.

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. But if you find the files then cat them, it should work just fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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