Shortcut to multiple commands for cleanup
You have a couple of options to do this....
Create a bash script.
#!/bin/bash
rm -rf ~/Library/Logs/* ~/Library/Caches/
sudo rm -rf /Library/Logs/* /Library/Caches/*

Assuming you've named it &quot;cleanup&quot; first make sure you set it to be executable:  chmod +x cleanup.
Then put it in one of the directories in your PATH by copying it or symlinking it:  cp cleanup /usr/local/bin or ln -s ./cleanup /usr/local/bin/cleanup
Make an alias
alias cleanup=&quot;rm -rf ~/Library/Logs/* ~/Library/Caches/; sudo rm -rf /Library/Logs/* /Library/Caches/*&quot;

Put that alias in your ~/.bash_profile so it's set every time you start a Terminal session.
Now that it's an alias, you can execute the command cleanup from Terminal and it will run those two commands.