This is intended as a very minimal guide to getting around the UNIX
command line with minimum pain.
Here are the commands we feel will be most useful to you in our
classes and projects:
ls: lists files in the
current directory (folder)
ls -a: list all files, including hidden
ones
pwd: print working
directory (tells you where you are!)
cd [dirname]: change directory to [dirname]
cp [file1] [file2]: copies [file1] to [file2]
mv [file1] [file2]: move [file1] to [file2] (file1
will be gone!)
rm [file]: remove [file]
cat [file]: dumps file to stdout
echo $var: displays value of $var
find . -name [file]: look for [file] in
or under current directory
grep <pattern> [files]: search for
<pattern> in [files]
grep [a-z][0-9] *.py
git specific commands:
git init: create a new git
repository (repo)
git add [files...]: adds a list of files to the
repo you are currently in -- will fail if you are not in a repo
folder!
git commit -a -m "Your message here.": commits all
changed files to the current repo.
git push origin master: pushes your changes to the
"origin" repo: in our case, that is GitHub
git pull origin master: pull changes from the
origin repo (in our case GitHub) to the machine you
are on