arecord & file names

I use arecord to record interviews with interesting elderly folks. Yesterday I’d just concluded a 2 hour interview with a delightful 97 year old woman when I carelessly restarted arecord without changing the filename (i.e. I used the up arrow to “recycle” the command line). I realized my mistake immediately, but it was too late… the interview was lost. The file had already been overwritten.

Can anyone suggest a command syntax that would generate a unique filename as arecord starts a session? I’ve tried the suggested example in the man file and as many variations as I can come up with, but I’ve been unsuccessful.

greyshark@X205:~> arecord -f cd -t wav -max-file-time 3600 --use-strftime %Y/%m/%d/listen-%H-%M-%v.wav
arecord: invalid option -- 'm'
Try `arecord --help' for more information.

Alternatively, can you suggest another program to use? I need something really simple that I can trigger without taking a lot of attention off the interview. (Krecord does not work on this PC)

(11.4, KDE 4.6.5)

Use date to generate a unique filename:

arecord … $(date ‘+%Y/%m/%d/listen-%H-%M-1.wav’)

There is no %v in date format specification, you’ll have to solve that one. Probably adding seconds is sufficiently unique.

Solved

Thanx ken_yap. You set me on the right path. I ended up settling on

arecord $(date '+%Y-%m-%d_%H-%M-%s.wav')

gives me a nice compact file, good since I don’t need fidelity to be able to transcribe, and I use the date and time to identify the session and the seconds to ensure the file name is unique.

Example:

greyshark@X205:~> arecord $(date '+%Y-%m-%d_%H-%M-%s.wav')
Recording WAVE '2011-08-21_12-54-1313945655.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono