snippets

🔌 Toolbox of short, reusable pieces of code and knowledge.

View the Project on GitHub rosikand/snippets

Some unix commands

Run previous command

Instead of having to write out python3 prog.py every time, you can do

ctrl + p

to type the previous command!

Download entire website and all its files

wget -r --no-parent <site-url-here>

Unzip gzipped tar

Useful for getting LaTeX source from Arxiv papers.

tar -xvf <file-name-here>

SCP

Secure copy protocol (scp) provides a way to transfer files between two unix computers (and works with SSH too!)

File:

Source.

scp [options] username1@source_host:directory1/filename1 username2@destination_host:directory2/filename2

Directory: just add the -r flag:

Example:

scp -r sunetid@myth.stanford.edu:WWW .