Thursday, April 30, 2015

Merging multiple files using the cat command


Nothing major today, this is a straightforward case that I was surprised would work with the Linux cat command.

I had a folder with several mp3's that were part of one long mixtape but were split into dozens of files, when they should have really been one big file.

I could have used a tool to fix this, but it can be accomplished natively using a Linux or Mac terminal.

First navigate to the folder where the files are located. If they are in numerical order, that's short and easy.

 cat *.mp3 > ../mylongsong.mp3

This combines all the files into one and dumps in one directory above to avoid an endless loop, depending on the shell you're using.


If the files have arbitrary names, but you can figure out the order, you can use a slightly longer command:

cat 1.mp3 2.mp3 a.mp3 myfav.mp3 wow.mp3 > ../mylongsong2.mp3

The caveat is that all the files need to be encoded the same way and be of the same filetype. It will not merge mp3 with wma, it will not merge a 320kbps mp3 with a 128kbps version.



53 comments:

  1. Creativity at its best, this is the only expression that I can share with you! I expect new topics in the fore coming installment of articles, good luck to you all.


    Regards,
    best essay writer

    ReplyDelete
  2. Hi dear, I like your post so much, and it is very good. Hope that we can communicate with each other. I want to introduce an aso services, I try it and I feel it is so good to us beginners.

    ReplyDelete
  3. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.


    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

    ReplyDelete
  4. Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.

    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar
    selenium training in chennai

    ReplyDelete
  5. I appreciate that you produced this wonderful article to help us get more knowledge about this topic. I know, it is not an easy task to write such a big article in one day, I've tried that and I've failed. But, here you are, trying the big task and finishing it off and getting good comments and ratings. That is one hell of a job done!
    Python training in marathahalli
    Python training in pune
    AWS Training in chennai

    ReplyDelete
  6. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Devops Training in Chennai
    Devops training in sholinganallur

    ReplyDelete
  7. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    ReplyDelete
  8. Hi,
    I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.
    Android Training in Chennai
    Android training
    Android training near me
    AWS Course in Chennai
    AWS Certification Training in Chennai
    AWS Training near me

    ReplyDelete
  9. You sit and think how to earn? Come to us and get your first win best online slots Play and always win.

    ReplyDelete
  10. Качественная лед лента разных цветов, герметичные и нет, я обычно беру в Экодио

    ReplyDelete
  11. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    angularjs online training

    apache spark online training

    informatica mdm online training

    devops online training

    aws online training

    ReplyDelete
  12. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
    Microsoft Azure online training
    Selenium online training
    Java online training
    Java Script online training
    Share Point online training

    ReplyDelete
  13. Awesome post, Great to Land here, Keep going, have a great Success!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    we are providing Elearning Company in Chennai since
    Digital Learning Solutions is a big boom to the Students and employee Engagement
    Mycoach Learning is the best certified Elearning Company, which offers
    Mycoach LMS

    ReplyDelete
  14. Wow! Really a nice blog. Thank you so much for your effort.

    Website Development Company in Delhi

    ReplyDelete
  15. Wonderful article… Thanks for sharing such useful article E Cigarette Australia

    ReplyDelete
  16. Are your preparing for government examination? Effective preparation is important to be successful, make use of our TNPSC Current affairs to prepare for your TNPSC & other government examination.

    ReplyDelete
  17. Good job! Fruitful article. I like this very much. It is very useful for my research. It shows your interest in this topic very well. I hope you will post some more information about the software. Please keep sharing!!
    Hadoop Training in Chennai
    Big Data Training in Chennai
    Devops Training in Chennai
    Digital Marketing Course in Chennai
    RPA Training in Chennai
    SEO Training in Chennai
    Hadoop Training in Tambaram
    Hadoop Training in Porur

    ReplyDelete
  18. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ReplyDelete
  19. Home Mart is a site about Home Improvement, Furniture, Home Appliances and many more. We are a bunch of passionate group of people who aim to serve you a convenient one-stop online shopping experience, for you to be able to sit at home worry-free and pick your favorite products with value.

    Check out the best
    furniture nz
    furniture sale
    Dog Cages
    bedroom furniture nz
    entertainment unit
    shoe rack

    ReplyDelete
  20. awesome blog it's very nice and useful i got many more information it's really nice i like your blog styleweb design company in velachery

    ReplyDelete
  21. I Got Job in my dream company with decent 12 Lacks Per Annum salary, I have learned this world most demanding course out there in the current IT Market from the python training in pune experts who helped me a lot to achieve my dreams comes true. Really worth trying.

    ReplyDelete
  22. I learned World's Trending Technology from certified experts for free of cost. I Got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from Python Training in pune experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying Freelance seo expert in bangalore

    ReplyDelete
  23. your post is really very interesting to read. I got Very valuable information from your blog.I’m satisfied with the information that you provide for me.Thanks for sharing it.

    Python Training in Pune

    ReplyDelete
  24. Very interesting information blog post, my favorite this post, thanks a lot for these amazing content.
    Assignment Help
    Online Assignment Help

    ReplyDelete
  25. Assignment Help is the best solution to fix the issues of assignment writing at affordable rates. Get your homework completed in one click. For more information, talk to our experts.

    ReplyDelete
  26. Nice Post! It helps me to know about Nepal Tour Package. It gives a lot of information to book the best Nepal tour packages. Thanks for sharing this blog!
    Nepal Tour Packages
    Nepal Tour Package
    Nepal Tourism Packages
    Nepal Tourist Packages
    Nepal Tour
    Most Beautiful Places In The World

    ReplyDelete