Shell code snippets

Shell code snippets

Remove a directory

rm -r dir_name/

Save output to file

SomeCommand > SomeFile.txt

Save errors to file

SomeCommand 2> SomeFile.txt

Run program in the background

python file.py &