[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash script to convert, compress





Le 27.12.2012 11:47, tsitras@linuxmail.org a écrit :
Hi. i am running debian 6.0.6 and i am banging my head to create a
simple script that will run periodically (through cron).
 i do have a whole lot of wav files in opt/wavfiles and i do need:
 -convert them to mp3
 -delete the wav files that have been converted to mp3
 -compress the files and move the compressed file to /opt/mp3backups
 is there a simple script ready for the job?

I do not think you will find a script for that particular need, because that's quite easy to do, it sounds like an exercise to learn shell scripting. You just write the script in English, you just need to "translate" it in shell. That's the matter of 6 lines.

Another point about your script: compressing a bunch of mp3 is a waste of CPU resources and time, because music, as photo (not drawings, some can be compressed) and films, can be only "compressed" with data losses. The more useful thing you can do is archiving them in a single tar file, but that's not actually compression (but you could gain some space anyway, because there is no cluster in a file, unlike partitions systems).


Reply to: