-
Notifications
You must be signed in to change notification settings - Fork 76
Useful Unix
A good place to find lots of information for beginners is [here](http://vic.gedris.org/Manual-ShellIntro/1.2/ShellIntro.pdf).
Using the terminal/emacs will be a lot less painful if you know the shortcuts/commands.
- Ctrl + ‘a’: go to the beginning of the line.
- Ctrl + ‘e’: go to the end of the line.
- Ctrl + ‘d’: delete forward one character.
- Ctrl + ‘c’: cancel currently running program or command.
- Ctrl + ‘k’: “kill” the current line, which deletes all characters from the cursor to the end of the line
- Ctrl + ‘w’: delete backwards one word.
- Up Arrow: gives you the contents of your last command (can be used repeatedly to go back any number of commands)
Scripts are really useful. They’re all the .sh files you find in our scripts folder. To run a script just do ./scriptname.sh in the directory with the script or path/to/script/scriptname.sh for a full-path to the script in any terminal. The dot in the first version just means current directory. The way to think of scripts is just a batch of operations that will run under the terminal in a certain sequence. So instead of running them one by one by hand, the script will tell the shell to run them. If you ever have a process that you would want to automate, write a script! A good intro with examples are [here](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html). You can also look through our scripts in the script folder to see what they’re about.