Changes between Version 1 and Version 2 of CheatSheet


Ignore:
Timestamp:
Dec 5, 2013, 2:56:12 PM (10 years ago)
Author:
Mikael Brandström Durling
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CheatSheet

    v1 v2  
    22
    33To log in to the grid, you need to use PuTTY if you use a PC, or, in the case of a mac, you can log in from the terminal.
     4
     5=== How do I abort that command??? ===
     6Most commands can be aborted by pressing `ctr-C`. If it looks like you are in a text editor, but can't get out, try the following:
     7 * `ctr-X`
     8 * Hit `Esc` several times, and then type `:q!`and press enter.
     9
    410
    511=== Loggin in to other machines with SSH ===
     
    5157without any arguments will return you to your home directory.
    5258
     59=== Copy file ===
     60
     61To copy a file use
     62{{{
     63$ cp source destination
     64}}}
     65
     66You can have more than one source, but then the destination must be a directory. The final argument is always the destination. Eg.
     67{{{
     68$ cp file1 file2 file3 dest_dir
     69}}}
     70
     71If any of the sourcres is a directory, you have to give copy the `-r` option.
     72{{{
     73$ cp -r dir1 dest_dir
     74}}}
     75
     76=== Removing files or directories ===
     77{{{
     78$ rm file
     79}}}
     80will remove file,
     81
     82If you would like to remove a directory, add the -r option to rm
     83{{{
     84$ rm -r directory
     85}}}
     86
     87=== Create directory ===
     88
     89{{{
     90$ mkdir directory_name
     91}}}
     92
     93=== Looking at the content of a file
     94{{{
     95$ less filename
     96}}}
     97will bring up the content of the file on the screen. Use arrow keys to move up and down. You can search within the file by typing `/`and then what you would like to search for. Leave less by typing `q`.
    5398
    5499
     100=== Getting help on command usage ===
     101There is a man page available for most commands. It is accessed with the man command
     102{{{
     103$ man cp
     104}}}
     105for example. You can browse with arrow keys, and leave the man page by pressing `q`
     106