Changes between Version 19 and Version 20 of cypress/BasicLinuxComands
- Timestamp:
- 08/24/16 14:25:57 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
cypress/BasicLinuxComands
v19 v20 16 16 [tulaneID@cypress1 ~]$ pwd 17 17 /home/tulaneID 18 [tulaneID@cypress1 ~]$ 18 19 }}} 19 20 20 21 === cd === 21 22 22 The '''cd''' command changes directory. 23 The '''cd''' command changes directory. (Observe the change of directory name in the resulting system prompt as well!) 23 24 24 25 {{{ 25 26 [tulaneID@cypress1 ~]$ cd NextDirectoryDown 26 [tulaneID@cypress1 ~]$ pwd27 [tulaneID@cypress1 NextDirectoryDown]$ pwd 27 28 /home/tulaneID/NextDirectoryDown 29 [tulaneID@cypress1 NextDirectoryDown]$ 28 30 }}} 29 31 … … 31 33 32 34 {{{ 33 [tulaneID@cypress1 ~]$ pwd35 [tulaneID@cypress1 NextDirectoryDown]$ pwd 34 36 /home/tulaneID/NextDirectoryDown 35 [tulaneID@cypress1 ~]$ cd ..37 [tulaneID@cypress1 NextDirectoryDown]$ cd .. 36 38 [tulaneID@cypress1 ~]$ pwd 37 39 /home/tulaneID 40 [tulaneID@cypress1 ~]$ 38 41 }}} 39 42 … … 44 47 /home 45 48 [tulaneID@cypress1 ~]$ cd tulaneID/NextDirectoryDown 46 [tulaneID@cypress1 ~]$ pwd49 [tulaneID@cypress1 NextDirectoryDown]$ pwd 47 50 /home/tulaneID/NextDirectoryDown 48 51 [tulaneID@cypress1 ~]$ cd /home 49 52 [tulaneID@cypress1 ~]$ pwd 50 53 /home 51 }}} 52 53 Lastly, if you ever get lost you can use the tilde (~) to return to your HOME directory. 54 [tulaneID@cypress1 ~]$ 55 }}} 56 57 Lastly, if you ever get lost you can use the tilde (~ - or simply **cd** with no argument!) to return to your HOME directory. 54 58 {{{ 55 59 [tulaneID@cypress1 ~]$ cd ~ 56 60 [tulaneID@cypress1 ~]$ pwd 57 61 /home/tulaneID 62 [tulaneID@cypress1 ~]$ 58 63 }}} 59 64 … … 63 68 [tulaneID@cypress1 ~]$ ls 64 69 a.out code.c Makefile 70 [tulaneID@cypress1 ~]$ 65 71 }}} 66 72 … … 69 75 [tulaneID@cypress1 ~]$ ls a.out 70 76 a.out 77 [tulaneID@cypress1 ~]$ 71 78 }}} 72 79 … … 78 85 -rw-r--r-- 1 tulaneID MyGroup 0 Aug 14 10:57 code.c 79 86 -rw-r--r-- 1 tulaneID MyGroup 0 Aug 14 10:57 Makefile 87 [tulaneID@cypress1 ~]$ 80 88 }}} 81 89 … … 87 95 [tulaneID@cypress1 ~]$ mkdir testdir 88 96 [tulaneID@cypress1 ~]$ cd testdir 89 [tulaneID@cypress1 ~]$ pwd97 [tulaneID@cypress1 testdir]$ pwd 90 98 /home/tulaneID/testdir 99 [tulaneID@cypress1 testdir]$ 91 100 }}} 92 101 … … 113 122 [tulaneID@cypress1 ~]$ ls testdir 114 123 ls: cannot access testdir: No such file or directory 124 [tulaneID@cypress1 ~]$ 115 125 }}} 116 126 … … 153 163 [tulaneID@cypress1 ~]$ ls file2 154 164 file2 165 [tulaneID@cypress1 ~]$ 155 166 }}} 156 167 Unlike '''cp''', the '''mv''' command does not create a second instance of the file or directory. … … 167 178 saturday 168 179 sunday 180 [tulaneID@cypress1 ~]$ 169 181 }}} 170 182 … … 185 197 bullfrog 186 198 Little Doggie 199 [tulaneID@cypress1 ~]$ 187 200 }}} 188 201 The ''-f'' flag can be used to tail a file interactively. New additions to the end of the file will be printed to your screen. … … 194 207 dog 195 208 Dog 209 [tulaneID@cypress1 ~]$ 196 210 }}} 197 211 … … 206 220 207 221 (See also '''man gzip'''.) 222 223 === which === 224 '''which <command name>''' tells the location of the named command. 225 {{{ 226 [tulaneID@cypress1 ~]$ which zless 227 /usr/bin/zless 228 [tulaneID@cypress1 ~]$ 229 }}} 208 230 209 231 == Basic Linux Commands Exercise == … … 270 292 master.10ge.cluster:/share/apps 271 293 6459M 10000M 10000M 23260 250k 250k 294 [tulaneID@cypress1 ~]$ 272 295 }}} 273 296 … … 283 306 bullfrog 284 307 Little Doggie 285 286 308 [tulaneID@cypress1 ~]$ grep dog animals 287 309 dog 310 [tulaneID@cypress1 ~]$ 288 311 }}} 289 312 Use the ''-v'' flag to print out every line excluding those containing the search term. Notice that "dog" (lowercase) is missing from the results. … … 296 319 bullfrog 297 320 Little Doggie 321 [tulaneID@cypress1 ~]$ 298 322 }}} 299 323 The ''-i'' flag will search without case-sensitivity. … … 304 328 DOG 305 329 Little Doggie 330 [tulaneID@cypress1 ~]$ 306 331 }}} 307 332 The ''-i'' and ''-v'' flag can be combined to exclude all lines containing the search term regardless of capitalization. … … 311 336 Racoon 312 337 bullfrog 338 [tulaneID@cypress1 ~]$ 313 339 }}} 314 340 … … 420 446 -rw-r--r-- 1 tulaneID workshop 0 Aug 18 21:50 textfile01.txt 421 447 -rw-r--r-- 1 tulaneID workshop 0 Aug 18 21:50 textfile02.txt 448 [tulaneID@cypress1 ~]$ 422 449 }}} 423 450