1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17<!doctype html> 18<html lang="en"> 19 <head> 20 <meta charset="utf-8"> 21 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 22 <meta http-equiv="last-modified" content="2020-02-04 18:01:38 +0000"> 23 <meta name="viewport" content="width=device-width, initial-scale=1"> 24 <!-- meta "search-domain" used for google site search function google_search() --> 25 <meta name="search-domain" value="http://supa-uk.github.io/swc-shell-novice"> 26 <link rel="stylesheet" type="text/css" href="./assets/css/bootstrap.css" /> 27 <link rel="stylesheet" type="text/css" href="./assets/css/bootstrap-theme.css" /> 28 <link rel="stylesheet" type="text/css" href="./assets/css/lesson.css" /> 29 <link rel="stylesheet" type="text/css" href="./assets/css/syntax.css" /> 30 31 32 33 34 35 <!-- Favicons for everyone --> 36 <link rel="apple-touch-icon-precomposed" sizes="57x57" href="./assets/favicons/swc/apple-touch-icon-57x57.png" /> 37 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/favicons/swc/apple-touch-icon-114x114.png" /> 38 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/favicons/swc/apple-touch-icon-72x72.png" /> 39 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/favicons/swc/apple-touch-icon-144x144.png" /> 40 <link rel="apple-touch-icon-precomposed" sizes="60x60" href="./assets/favicons/swc/apple-touch-icon-60x60.png" /> 41 <link rel="apple-touch-icon-precomposed" sizes="120x120" href="./assets/favicons/swc/apple-touch-icon-120x120.png" /> 42 <link rel="apple-touch-icon-precomposed" sizes="76x76" href="./assets/favicons/swc/apple-touch-icon-76x76.png" /> 43 <link rel="apple-touch-icon-precomposed" sizes="152x152" href="./assets/favicons/swc/apple-touch-icon-152x152.png" /> 44 <link rel="icon" type="image/png" href="./assets/favicons/swc/favicon-196x196.png" sizes="196x196" /> 45 <link rel="icon" type="image/png" href="./assets/favicons/swc/favicon-96x96.png" sizes="96x96" /> 46 <link rel="icon" type="image/png" href="./assets/favicons/swc/favicon-32x32.png" sizes="32x32" /> 47 <link rel="icon" type="image/png" href="./assets/favicons/swc/favicon-16x16.png" sizes="16x16" /> 48 <link rel="icon" type="image/png" href="./assets/favicons/swc/favicon-128.png" sizes="128x128" /> 49 <meta name="application-name" content="Software Carpentry - The Unix Shell"/> 50 <meta name="msapplication-TileColor" content="#FFFFFF" /> 51 <meta name="msapplication-TileImage" content="./assets/favicons/swc/mstile-144x144.png" /> 52 <meta name="msapplication-square70x70logo" content="./assets/favicons/swc/mstile-70x70.png" /> 53 <meta name="msapplication-square150x150logo" content="./assets/favicons/swc/mstile-150x150.png" /> 54 <meta name="msapplication-wide310x150logo" content="./assets/favicons/swc/mstile-310x150.png" /> 55 <meta name="msapplication-square310x310logo" content="./assets/favicons/swc/mstile-310x310.png" /> 56 57 58 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 59 <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 60 <!--[if lt IE 9]> 61
61<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
61 62
62<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
62 63 <![endif]--> 64 65 <title> 66 The Unix Shell 67 </title> 68 69 </head> 70 <body> 71 72 73 74 75 76 <div class="container"> 77 78 79 80 81 82 83 84 85<!-- Manual ordering of Episodes begins here --> 86 87 88 89 90 91 92 93 94 95 96 97 98<!-- Manual ordering of Extras begins here --> 99 100 101 102 103 104 105<nav class="navbar navbar-default"> 106 <div class="container-fluid"> 107 <div class="navbar-header"> 108 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> 109 <span class="sr-only">Toggle navigation</span> 110 <span class="icon-bar"></span> 111 <span class="icon-bar"></span> 112 <span class="icon-bar"></span> 113 </button> 114 115 116 117 <a href="" class="pull-left"> 118 <img class="navbar-logo" src="./assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /> 119 </a> 120 121 122 123 <a class="navbar-brand" href="./">Home</a> 124 125 </div> 126 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 127 <ul class="nav navbar-nav"> 128 129 130 <li><a href="./CODE_OF_CONDUCT.html">Code of Conduct</a></li> 131 132 133 134 <li><a href="./setup.html">Setup</a></li> 135 136 137 <li class="dropdown"> 138 <a href="./" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a> 139 <ul class="dropdown-menu"> 140 141 142 <li><a href="./01-intro/index.html">Introducing the Shell</a></li> 143 144 145 <li><a href="./02-filedir/index.html">Navigating Files and Directories</a></li> 146 147 148 <li><a href="./03-create/index.html">Working With Files and Directories</a></li> 149 150 151 <li><a href="./04-pipefilter/index.html">Pipes and Filters</a></li> 152 153 154 <li><a href="./05-loop/index.html">Loops</a></li> 155 156 157 <li><a href="./06-script/index.html">Shell Scripts</a></li> 158 159 160 <li><a href="./07-find/index.html">Finding Things</a></li> 161 162 <li role="separator" class="divider"></li> 163 <li><a href="./aio/index.html">All in one page (Beta)</a></li> 164 </ul> 165 </li> 166 167 168 169 170 <li class="dropdown"> 171 <a href="./" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a> 172 <ul class="dropdown-menu"> 173 <li><a href="./reference/">Reference</a></li> 174 175 176 <li><a href="./about/">About</a></li> 177 178 179 <li><a href="./discuss/">Discussion</a></li> 180 181 182 <li><a href="./figures/index.html">Figures</a></li> 183 184 185 <li><a href="./guide/">Instructor Notes</a></li> 186 187 </ul> 188 </li> 189 190 191 192 <li><a href="./LICENSE.html">License</a></li> 193 194 <li><a href="https://github.com/supa-uk/swc-shell-novice/edit/gh-pages/index.md" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li> 195 196 </ul> 197 <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;"> 198 <div class="form-group"> 199 <input type="text" id="google-search" placeholder="Search..." aria-label="Google site search"> 200 </div> 201 </form> 202 </div> 203 </div> 204</nav> 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221<h1 class="maintitle"><a href="./">The Unix Shell</a></h1> 222 223 224 225<article> 226 <p>The Unix shell has been around longer than most of its users have been alive. 227It has survived so long because itâs a power tool 228that allows people to do complex things with just a few keystrokes. 229More importantly, 230it helps them combine existing programs in new ways 231and automate repetitive tasks 232so they arenât typing the same things over and over again. 233Use of the shell is fundamental to using a wide range of other powerful tools 234and computing resources (including âhigh-performance computingâ supercomputers). 235These lessons will start you on a path towards using these resources effectively.</p> 236 237<blockquote class="prereq"> 238 <h2 id="prerequisites">Prerequisites</h2> 239 240 <p>This lesson guides you through the basics of file systems and the 241shell. If you have stored files on a computer at all and recognize 242the word âfileâ and either âdirectoryâ or âfolderâ (two common words 243for the same thing), youâre ready for this lesson.</p> 244 245 <p>If youâre already comfortable manipulating files and directories, 246searching for files with <code class="language-plaintext highlighter-rouge">grep</code> and <code class="language-plaintext highlighter-rouge">find</code>, and writing simple loops 247and scripts, you probably want to explore the next lesson: <a href="https://carpentries-incubator.github.io/shell-extras/">shell-extras</a>.</p> 248</blockquote> 249 250</article> 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267<!-- Manual ordering of Episodes begins here --> 268 269 270 271 272 273 274 275 276 277 278 279 280<!-- Manual ordering of Extras begins here --> 281 282 283 284 285 286 287<div class="syllabus"> 288 <h2 id="schedule">Schedule</h2> 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 <table class="table table-striped"> 318 <tr> 319 320 <td class="col-md-2"></td> 321 <td class="col-md-3"><a href="./setup.html">Setup</a></td> 322 <td class="col-md-7">Download files required for the lesson</td> 323 </tr> 324 325 326 327 328 329 <tr> 330 331 <td class="col-md-2">00:00</td> 332 <td class="col-md-3"> 333 334 1. <a href="./01-intro/index.html">Introducing the Shell</a> 335 </td> 336 <td class="col-md-7"> 337 338 339 340 What is a command shell and why would I use one? 341 342 343 344 345 346 </td> 347 </tr> 348 349 350 351 352 353 354 <tr> 355 356 <td class="col-md-2">00:05</td> 357 <td class="col-md-3"> 358 359 2. <a href="./02-filedir/index.html">Navigating Files and Directories</a> 360 </td> 361 <td class="col-md-7"> 362 363 364 365 How can I move around on my computer? 366 367 368 <br/> 369 370 371 How can I see what files and directories I have? 372 373 374 <br/> 375 376 377 How can I specify the location of a file or directory on my computer? 378 379 380 381 382 383 </td> 384 </tr> 385 386 387 388 389 390 391 <tr> 392 393 <td class="col-md-2">00:45</td> 394 <td class="col-md-3"> 395 396 3. <a href="./03-create/index.html">Working With Files and Directories</a> 397 </td> 398 <td class="col-md-7"> 399 400 401 402 How can I create, copy, and delete files and directories? 403 404 405 <br/> 406 407 408 How can I edit files? 409 410 411 412 413 414 </td> 415 </tr> 416 417 418 419 420 421 422 <tr> 423 424 <td class="col-md-2">01:35</td> 425 <td class="col-md-3"> 426 427 4. <a href="./04-pipefilter/index.html">Pipes and Filters</a> 428 </td> 429 <td class="col-md-7"> 430 431 432 433 How can I combine existing commands to do new things? 434 435 436 437 438 439 </td> 440 </tr> 441 442 443 444 445 446 447 <tr> 448 449 <td class="col-md-2">02:10</td> 450 <td class="col-md-3"> 451 452 5. <a href="./05-loop/index.html">Loops</a> 453 </td> 454 <td class="col-md-7"> 455 456 457 458 How can I perform the same actions on many different files? 459 460 461 462 463 464 </td> 465 </tr> 466 467 468 469 470 471 472 <tr> 473 474 <td class="col-md-2">03:00</td> 475 <td class="col-md-3"> 476 477 6. <a href="./06-script/index.html">Shell Scripts</a> 478 </td> 479 <td class="col-md-7"> 480 481 482 483 How can I save and re-use commands? 484 485 486 487 488 489 </td> 490 </tr> 491 492 493 494 495 496 497 <tr> 498 499 <td class="col-md-2">03:45</td> 500 <td class="col-md-3"> 501 502 7. <a href="./07-find/index.html">Finding Things</a> 503 </td> 504 <td class="col-md-7"> 505 506 507
508 How can I find files? 509 510 511 <br/> 512 513 514 How can I find things in files? 515 516 517 518 519 520 </td> 521 </tr> 522 523 524 525 526 <tr> 527 528 <td class="col-md-2">04:30</td> 529 <td class="col-md-3">Finish</td> 530 <td class="col-md-7"></td> 531 </tr> 532 </table> 533 534 <p> 535 The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor. 536 </p> 537 538</div> 539 540 541 542 543 544 545 546 547 548 549<footer> 550 <div class="row"> 551 <div class="col-md-6 copyright" align="left"> 552 553 Licensed under <a href="">CC-BY 4.0</a> 2018â2020 554 by <a href="https://carpentries.org/">The Carpentries</a> 555 <br> 556 Licensed under <a href="">CC-BY 4.0</a> 2016â2018 557 by <a href="">Software Carpentry Foundation</a> 558 559 </div> 560 <div class="col-md-6" align="right"> 561 <h4> 562 <a href="http://www.supa.ac.uk">SUPA</a> 563 <a href="https://github.com/supa-uk/swc-shell-novice">Source</a> 564 <a href="mailto:[email protected]">Contact</a> 565 <a href="./licence/index.html">Licence</a> 566 </h4> 567 </div> 568 </div> 569</footer> 570 571 572 </div> 573
574<script src="./assets/js/jquery.min.js"></script>
vendor: 1 bytes, line 574
574
575<script src="./assets/js/bootstrap.min.js"></script>
vendor: 1 bytes, line 575
575
576<script src="./assets/js/lesson.js"></script>
vendor: 1 bytes, line 576
576
577<script>
vendor: 344 bytes, lines 577-582
577 578 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 579 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 580 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 581 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 582 ga('create', '
582UA-37305346-2
vendor: 38 bytes, lines 582-583
582', 'auto'); 583 ga('send', 'pageview');
584</script>
584 585 586 </body> 587</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.