Say i need to run a couple of commands automatically in a shell everytime i open the shell. how can i automate that?
For Example:
I need to automate the following:
- open a shell
- cd /specific folder
- find . -name 'app_logs'
It depends what OS and Terminal you're using. I imagine most of the popular terminal allows you to customise the startup command. For example, in the Terminal.app that comes with Mac OS X, you can go to Preferences > Settings > Shell > Startup / run command to specify a script to run on startup of each terminal window/tab.
Or you can simply at the commands at $HOME/.profile or $HOME/.bashrc, depending on your OS and shell.