n1moy
Member
Recording is continuously enabled on my sds200. The microSD card will eventually overflow without directory management. One user in this forum described the radio locking up and displaying, "SD Card Full". Others have described the process of removing the microSD card from the radio and using a computer to delete inactive files and directories. Have endeavored to utilize the Ethernet port and the ‘writable’ ftp account for this purpose.
Devised a Bash shell script to automate the deletion of aged microSD files and directories without removing the card from the radio. The script selects directories older than ~2 days to delete from the /audio/user_rec directory.
uniden-tidy.sh
gawk is the script's only dependency. The GNU implementation of awk is included by default in many Linux distributions. Both of the radio’s ftp server accounts are used. The ‘read only’ account to download a directory listing and the ‘writable’ for deletions. Five parameters are required at the top of the script; IP address, both account's username and password.
Reminder: The two ftp accounts are distinguished by different user names. [required]
Make the shell script executable by changing mode and access permissions.
Execute the script from the command line interface [CLI] or ‘Terminal’.
The scanner will enter ‘ftp-mode’ during the deletion of files and directories. The CLI will acknowledge the deletion of each file and directory. At completion a warm reboot will return the radio to ‘scan-mode’. If the script does not detect aged directories to delete, it will instead print a current sorted list.

Optional: Add the following line to your .bash_aliases file to enable the command ‘tidy’ in the CLI.
alias tidy='./uniden-tidy.sh'
Good luck,
Devised a Bash shell script to automate the deletion of aged microSD files and directories without removing the card from the radio. The script selects directories older than ~2 days to delete from the /audio/user_rec directory.
uniden-tidy.sh
gawk is the script's only dependency. The GNU implementation of awk is included by default in many Linux distributions. Both of the radio’s ftp server accounts are used. The ‘read only’ account to download a directory listing and the ‘writable’ for deletions. Five parameters are required at the top of the script; IP address, both account's username and password.
Reminder: The two ftp accounts are distinguished by different user names. [required]
Make the shell script executable by changing mode and access permissions.
Bash:
$ chmod a+x ~/uniden-tidy.sh
Execute the script from the command line interface [CLI] or ‘Terminal’.
Bash:
$ ./uniden-tidy.sh
The scanner will enter ‘ftp-mode’ during the deletion of files and directories. The CLI will acknowledge the deletion of each file and directory. At completion a warm reboot will return the radio to ‘scan-mode’. If the script does not detect aged directories to delete, it will instead print a current sorted list.

Optional: Add the following line to your .bash_aliases file to enable the command ‘tidy’ in the CLI.
alias tidy='./uniden-tidy.sh'
Good luck,