You need to set a timer and after it expires delete the folder with files from the desktop and the recycle bin. Apple MacBook not noticeable. Tell me how to implement this solution. Thank!

  • And is there a cron ? - don Rumata
  • @donRumata Why use crowns if this is a one-time operation? Moreover, they want to do it не заметно - Vitaliy Kalyuzhnyak
  • @VitaliyKalyuzhnyak, I read the campaign diagonally. - don Rumata

1 answer 1

If you need to delete on the tiper, then it is better to run the script in the background via the console. Example:

 sleep 100 rm -rf ~/Desktop/folder_name rm -rf ~/.Trash/folder_name rm -f my_script.sh 

Throw this code into the file my_script.sh and run

 bash my_script.sh & 
  • sleep 100 - 100 seconds
  • rm -rf ~/Desktop/folder_name - will remove the folder_name folder from the desktop
  • rm -rf ~/.Trash/folder_name - folder_name folder from the trash
  • rm -f my_script.sh - will delete the script file my_script.sh (will delete itself).