Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Unix commands

nvkelso edited this page · 19 revisions

Big list of basic UNIX commands »

Another list over there » - Unix tricks

map ports, useful for MapBox, PostGIS on other machines, etc

ssh -gvN -L 5433:localhost:5432 geo.stamen

Trouble shooting ssh tunnel, gunicorn process, etc:

$ ps auxwww | grep ssh

nvkelso  40396   0.0  0.0  2436228   2080 s001  T     4:04PM   0:03.13 ssh -gvN -L 5433:localhost:5432 geo.stamen

nvkelso    279   0.0  0.0  2486800    388   ??  S     1Jul11   0:00.61 /usr/bin/ssh-agent -l

nvkelso  41310   0.0  0.0  2425524    172 s001  U+    5:25PM   0:00.00 grep ssh

nvkelso  40600   0.0  0.0  2435168   1080 s004  S+    4:24PM   0:00.02 ssh geo.stamen

nvkelso  40473   0.0  0.0  2435168   1156 s002  S+    4:11PM   0:00.04 ssh geo.stamen

$ kill -9 40396

$ ps auxwww | grep ssh

nvkelso    279   0.0  0.0  2486276    376   ??  S     1Jul11   0:00.61 /usr/bin/ssh-agent -l

nvkelso  41315   0.0  0.0  2435120    560 s001  R+    5:25PM   0:00.00 grep ssh

nvkelso  40600   0.0  0.0  2435168   1080 s004  S+    4:24PM   0:00.02 ssh geo.stamen

nvkelso  40473   0.0  0.0  2435168   1156 s002  S+    4:11PM   0:00.04 ssh geo.stamen

[1]+  Killed                  ssh -gvN -L 5433:localhost:5432 geo.stamen

$ ssh -gvN -L 5433:localhost:5432 geo.stamen

Kill all active python processes

sudo killall -9 python

Kill all active postgres processes

sudo killall -9 postgres

Screen

Shell Scripts

Less is more

Auto-complete in Bash sheell

How to make a file executable (chmod 755):

chmod 755 filename

Make this directory writeable

sudo chgrp -R admin . << to make sure it's in the right group, not always nec.

sudo chmod -R g+w .

IBM has a good manual of basic unix commands in plain English with examples.

Something went wrong with that request. Please try again.