Changes between Version 1 and Version 2 of CheatSheet
- Timestamp:
- Dec 5, 2013, 2:56:12 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CheatSheet
v1 v2 2 2 3 3 To 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??? === 6 Most 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 4 10 5 11 === Loggin in to other machines with SSH === … … 51 57 without any arguments will return you to your home directory. 52 58 59 === Copy file === 60 61 To copy a file use 62 {{{ 63 $ cp source destination 64 }}} 65 66 You 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 71 If 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 }}} 80 will remove file, 81 82 If 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 }}} 97 will 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`. 53 98 54 99 100 === Getting help on command usage === 101 There is a man page available for most commands. It is accessed with the man command 102 {{{ 103 $ man cp 104 }}} 105 for example. You can browse with arrow keys, and leave the man page by pressing `q` 106