Debian 9, default installation, nothing special, just pure and simple.
I want the file
/var/www/something/check.log
to be deleted every time the system boots.
How?
Debian 9, default installation, nothing special, just pure and simple.
I want the file
/var/www/something/check.log
to be deleted every time the system boots.
How?
create a simple script nano /home/user/boot.sh
once inside add this code
#!/bin/bash
rm /var/www/something/check.log
Save the file.
give permissions to that file chmod +x /home/user/boot.sh
now open crontab -e
inside add the following line
@reboot /home/user/boot.sh
Save the cron, reboot and report feedback