reset can script with 1 month of log files

This commit is contained in:
R.P. Clark 2024-12-11 09:25:20 +00:00
parent 42c2f05c5b
commit 3b3037b5b4

13
reset_can.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
sudo ip link set can0 down
sudo ip link set can0 type can bitrate 100000 sjw 128
sudo ip link set can0 up
/usr/bin/candump -l -t A can0 &
# Find and delete .log files older than one month
#
find . -type f -name "*.log" -mtime +30 -exec rm -f {} \;