Skip to content

Command line Cheat Sheet

Lance Pollard edited this page Sep 25, 2012 · 7 revisions

This is a generic/intro guide to the bash shell.

The reason for this is to provider relatively new coders with a simple reference to the command-line.

File System Commands

Print Current Directory

pwd

Changing Directories

cd ./packages
cd packages

List Files in Directory

ls

Moving Files

mv packages lib

Copying Files and Directories

cp ./lib/tower.js ./tmp/tower.js

Create a File

touch ./tmp/tower.js

Removing Files and Directories

rm -rfv ./tmp

Symlinking Files

Make a file "executable"

chmod 755 ./bin/tower

Append content to a file

Replace content in a file

Searching files

HTTP Commands

Downloading Files

curl ...

Uploading Files

Downloading a Website

GET JSON

POST JSON

PUT JSON

DELETE JSON

System Commands

Show Operation System Version

uname -a

Print IP Address

Show executable path

which tower

List Processes

ps -ax

Kill a Process

Logging

tail -n 500
top

Limits

ulimit -n 10240

Shell Variables

Environment Variables

Custom Variables

Pipes

Filters

Summary

  • sed
  • awk
  • grep
  • find
  • which
  • chmod
  • curl
  • wget
  • touch
  • cp
  • cd
  • pwd
  • ls
  • kill
  • ps
  • wc
  • cat
  • echo

Keyboard Events

Resources

Clone this wiki locally