28. Nov 2005
Important Commandline Magic
Login to my server:
ssh -l gene o.nadir.net
Copy a file from o to the local computer:
scp gene@o.nadir.net:singularstrategies.net/index.html .
Copy a local file to o:
scp index.html gene@o.nadir.net:singularstrategies.net/index.html
Open a file in a Mac OS X Terminal to edit:
open -e index.html
List local files: ls
Create Directory: mkdir myDirectory
Remove file: rm myFile
Open file with VI:
vi filename.html
Write to file:
[esc] :w[enter]
Write to file and Quit:
[esc] :wq[enter]
Don't write to file and Quit:
[esc] :q![enter]
cut out the line under the cursor:
[esc] dd
cut out 5 lines starting under the cursor:
[esc] d5d
paste what you've been cutting out before:
[esc] p
Insert here:
[esc] i
Insert at end of line:
[esc] A
Undo:
[esc] u
VI Tutorial
