Join Files Using Linux Sox

I was recording audio on Audacity the other day when Windows crashed unexpectedly. I never had a chance to save the recording. When Windows rebooted, the audio recording were all there, but they were all broken up in smaller files. As it turned out, they were over 100 .au files under the unsaved Audacity folder. The question is how do you piece the files together.

There’s a Linux sound utility called “SoX” that┬áruns across multiple platforms, Windows, Linux, MacOS X, that converts various formats of computer audio files into other formats. SoX can play and record audio files as well. To recover the unsaved Audacity recording, I went to the Audacity folder and executed the following statement from the command line.

sox *.au combined.au

Essentially, the sox command you see above concatenates multiple files into one big file called combined.au. After that, I created a new Audacity project and imported the combined big file into the new project. I then saved the new project. Once saved, I can then export the project to a MP3 format.

If you ever need to recover from a crashed Audacity project, you can use the sox command to recover a project.