--max-file-time
While recording, when the output file has been accumulating sound for this long, close it and open a new output file. Default is the maximum size supported by the file format: 2 GiB for WAV files. This option has no effect if --separate-channels is specified.
--use-strftime
When recording, interpret %-codes in the file name parameter using the strftime facility whenever the output file is opened. The important strftime codes are: %Y is the year, %m month, %d day of the month, %H hour, %M minute and %S second. In addition, %v is the file number, starting at 1. When this option is specified, intermediate directories for the output file are created automatically. This option has no effect if --separate-channels is specified.
循环录制
arecord -t wav --max-file-time 30 mon.wav
Record from the default audio source in monaural, 8,000 samples per second, 8 bits per sample. Start a new file every 30 seconds. File names are mon-nn.wav, where nn increases from 01. The file after mon-99.wav is mon-100.wav.
存储在目录./年/月/日/listen-时-分-秒-序号.wav
arecord -f cd -t wav --max-file-time 3600 --use-strftime %Y/%m/%d/listen-%H-%M-%v.wav
Record in stereo from the default audio source. Create a new file every hour. The files are placed in directories based on their start dates and have names which include their start times and file numbers.
存储在当前目录,文件命名年月日-listen-时分-序号.wav
arecord -f cd -t wav --max-file-time 3600 --use-strftime %Y%m%d—listen-%H%M-%v.wav