unixsurvivalguide - Methods

Revision 1 as of 2012-03-21 18:31:08

Clear message
location: unixsurvivalguide

Your Survival Guide to Unix at the CBSU

Commands

Function

Command

Options

Show contents of current directory:

ls

(details: ls –l, hidden files: ls –a, output to file: ls > file.txt)

Change directory:

cd

(one up: cd .. | to home directory cd ~)

Make directory:

mkdir newdir

Copy file/directory:

cp old new

Move file:

mv old new

Delete file:

rm filename

delete directory: rm –r dirname

Show load of linux boxes:

showload

Change linux box:

ssh l42

dos2unix

grep

See list of previous commands:

history

Show features of current linux box:

uname –a

Help on linux commands:

man yourcommand (quit typing “q”)

Edit files:

nedit, emacs, vi

Useful Tricks

Use cursor keys up/down to get previous commands

Execute command from history list: !x, where x is number in history list

Copy/paste: mark text with left mouse button, click to destination, click middle mouse button

Auto-complete commands: start typing, then “Tab” to complete to next unique possibility

General

VNC (http://imaging.mrc-cbu.cam.ac.uk/imaging/UsingVNC): Putty, vncserver –geometry 1280x1024 –name somename vncserver.glx -geometry 1280x1024 -name somename

Access home space: Windows \\home\username; Linux /home/username

Access imaging space: Windows \\samfs-lh\imaging; Linux /imaging/username

32-bit machines: l21, l24-31, l33-l36, l37-l42 64-bit machines: l43-l63 OpenGL machines: l37-l42

Computing on Intranet: http://intranet.mrc-cbu.cam.ac.uk/computing/

Intro to Unix: http://www.ee.surrey.ac.uk/Teaching/Unix/

Overview of CBU computing: http://imaging.mrc-cbu.cam.ac.uk/meg/Beginners/MatlabIntroCBU?action=AttachFile&do=get&target=RussellComputing.pdf