├── .editorconfig ├── .github ├── styles │ ├── Spelling │ │ └── Ignores.yml │ └── vocab.txt └── workflows │ ├── publishing.yml │ └── vale-linter.yml ├── .gitignore ├── .vale.ini ├── CHANGELOG.md ├── Gemfile ├── Gemfile.lock ├── INSTALLATION.md ├── README.md ├── Rakefile ├── additional.md ├── book ├── assets │ ├── cover.png │ ├── creativecommons.org_by-nc-nd_4.0_88x31.png │ ├── qrcodes │ │ ├── TTT_01.png │ │ ├── TTT_02.png │ │ ├── TTT_03.png │ │ ├── TTT_04.png │ │ ├── TTT_05.png │ │ ├── TTT_06.png │ │ ├── TTT_07.png │ │ ├── TTT_08.png │ │ ├── TTT_09.png │ │ ├── TTT_10.png │ │ ├── TTT_11.png │ │ ├── TTT_12.png │ │ ├── TTT_13.png │ │ ├── TTT_14.png │ │ ├── TTT_15.png │ │ ├── TTT_16.png │ │ ├── TTT_17.png │ │ ├── TTT_18a.png │ │ ├── TTT_18b.png │ │ ├── TTT_19.png │ │ ├── TTT_20.png │ │ ├── TTT_21.png │ │ ├── TTT_22.png │ │ ├── TTT_23a.png │ │ ├── TTT_23b.png │ │ ├── TTT_24.png │ │ ├── TTT_25a.png │ │ ├── TTT_25b.png │ │ ├── TTT_26.png │ │ ├── TTT_27a.png │ │ ├── TTT_27b.png │ │ ├── TTT_28.png │ │ ├── TTT_29.png │ │ ├── TTT_30.png │ │ ├── TTT_31.png │ │ ├── TTT_32.png │ │ ├── TTT_33.png │ │ ├── TTT_34.png │ │ ├── TTT_35.png │ │ ├── TTT_36.png │ │ ├── TTT_37.png │ │ ├── TTT_37A.png │ │ ├── TTT_38.png │ │ ├── TTT_39.png │ │ └── TTT_40.png │ ├── ttt1 │ │ ├── Screen-Shot-2013-04-13-at-15.29.39.png │ │ └── Screen-Shot-2013-04-13-at-15.30.07.png │ ├── ttt18 │ │ ├── Screen-Shot-2014-05-10-at-17.49.36.png │ │ ├── Screen-Shot-2014-05-10-at-17.55.51.png │ │ ├── Screen-Shot-2014-05-10-at-18.14.12.png │ │ └── Screen-Shot-2014-05-10-at-18.17.19.png │ ├── ttt2 │ │ ├── Screen-Shot-2013-04-26-at-20.47.07.png │ │ ├── Screen-Shot-2013-04-26-at-21.01.29.png │ │ ├── Screen-Shot-2013-04-26-at-21.11.39.png │ │ ├── Screen-Shot-2013-04-26-at-21.16.18.png │ │ └── Screenshot_26_04_2013_20_28.png │ ├── ttt22 │ │ └── exampletxt.png │ ├── ttt23 │ │ └── 512px-IP_stack_connections.svg.png │ ├── ttt24 │ │ ├── 1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png │ │ ├── 512px-IP_stack_connections.svg.png │ │ ├── HomeRouter.png │ │ └── fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png │ ├── ttt25 │ │ ├── 3d970446-33cb-4cc8-8358-5040cb13b8d0.png │ │ ├── HomeNetwork-WirelessAccessPoint-BAD-original.png │ │ ├── HomeNetwork-WirelessAccessPoint-BAD.png │ │ ├── HomeNetwork-WirelessAccessPoint-Good-original.png │ │ ├── HomeNetwork-WirelessAccessPoint-Good.png │ │ ├── HomeRouter.png │ │ └── SubnetWorkflow.png │ ├── ttt27 │ │ ├── DNSHierarchy.png │ │ ├── Screen-Shot-2015-01-16-at-15.00.22-300x241.png │ │ ├── Screen-Shot-2015-01-16-at-15.00.22.png │ │ └── f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png │ ├── ttt29 │ │ └── d411bff4-5d3d-452f-932b-d1176196f32e.png │ ├── ttt31 │ │ └── Screen-Shot-2015-04-04-at-14.53.39.png │ ├── ttt34 │ │ ├── Screen-Shot-2015-05-09-at-17.33.50.png │ │ ├── Screen-Shot-2015-05-09-at-17.33.58.png │ │ ├── Screen-Shot-2015-05-09-at-17.34.54.png │ │ └── Screen-Shot-2015-05-09-at-17.51.48.png │ ├── ttt38 │ │ ├── Screenshot-2020-07-11-at-12.59.30.png │ │ ├── Screenshot-2020-07-11-at-13.43.52.png │ │ └── Screenshot-2020-07-11-at-16.15.55.png │ ├── ttt39 │ │ └── Screenshot-2020-07-25-at-16.52.40.png │ ├── ttt4 │ │ └── Screen-Shot-2013-05-11-at-18.52.30.png │ └── ttt6 │ │ └── Basic_Unix_File_Permission_Masks.png ├── colophon.adoc ├── contributors.adoc ├── docinfo.html ├── index.asc ├── theme │ ├── bartificer.css │ ├── epub │ │ ├── epub3-css3-only.css │ │ └── epub3.css │ ├── fonts │ │ ├── LICENSE.txt │ │ ├── UFL.txt │ │ ├── notosans-bold.ttf │ │ ├── notosans-bold_italic.ttf │ │ ├── notosans-italic.ttf │ │ ├── notosans-normal.ttf │ │ ├── ubuntumono-bold.ttf │ │ ├── ubuntumono-bold_italic.ttf │ │ ├── ubuntumono-italic.ttf │ │ └── ubuntumono-normal.ttf │ └── pdf │ │ ├── bartificer-a5-theme.yml │ │ ├── bartificer-theme.yml │ │ └── bartificer-us-theme.yml ├── ttt-afterword.adoc ├── ttt-contents.adoc ├── ttt-foreword.adoc ├── ttt-introduction.adoc ├── ttt-preface.adoc ├── ttt-spine.adoc ├── ttt-troubleshooting.adoc ├── ttt01.adoc ├── ttt02.adoc ├── ttt03.adoc ├── ttt04.adoc ├── ttt05.adoc ├── ttt06.adoc ├── ttt07.adoc ├── ttt08.adoc ├── ttt09.adoc ├── ttt10.adoc ├── ttt11.adoc ├── ttt12.adoc ├── ttt13.adoc ├── ttt14.adoc ├── ttt15.adoc ├── ttt16.adoc ├── ttt17.adoc ├── ttt18.adoc ├── ttt19.adoc ├── ttt20.adoc ├── ttt21.adoc ├── ttt22.adoc ├── ttt23.adoc ├── ttt24.adoc ├── ttt25.adoc ├── ttt26.adoc ├── ttt27.adoc ├── ttt28.adoc ├── ttt29.adoc ├── ttt30.adoc ├── ttt31.adoc ├── ttt32.adoc ├── ttt33.adoc ├── ttt34.adoc ├── ttt35.adoc ├── ttt36.adoc ├── ttt37.adoc ├── ttt38.adoc ├── ttt39.adoc ├── ttt40.adoc └── variables.adoc ├── ci └── release-info.py ├── docs ├── . prettierignore ├── .DS_Store ├── CNAME ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon-120x120.png ├── apple-touch-icon-152x152.png ├── apple-touch-icon-180x180.png ├── apple-touch-icon-60x60.png ├── apple-touch-icon-76x76.png ├── apple-touch-icon.png ├── assets │ ├── .DS_Store │ ├── cover-small.png │ ├── cover.png │ ├── creativecommons.org_by-nc-nd_4.0_88x31.png │ ├── qrcodes │ │ ├── TTT_01.png │ │ ├── TTT_02.png │ │ ├── TTT_03.png │ │ ├── TTT_04.png │ │ ├── TTT_05.png │ │ ├── TTT_06.png │ │ ├── TTT_07.png │ │ ├── TTT_08.png │ │ ├── TTT_09.png │ │ ├── TTT_10.png │ │ ├── TTT_11.png │ │ ├── TTT_12.png │ │ ├── TTT_13.png │ │ ├── TTT_14.png │ │ ├── TTT_15.png │ │ ├── TTT_16.png │ │ ├── TTT_17.png │ │ ├── TTT_18a.png │ │ ├── TTT_18b.png │ │ ├── TTT_19.png │ │ ├── TTT_20.png │ │ ├── TTT_21.png │ │ ├── TTT_22.png │ │ ├── TTT_23a.png │ │ ├── TTT_23b.png │ │ ├── TTT_24.png │ │ ├── TTT_25a.png │ │ ├── TTT_25b.png │ │ ├── TTT_26.png │ │ ├── TTT_27a.png │ │ ├── TTT_27b.png │ │ ├── TTT_28.png │ │ ├── TTT_29.png │ │ ├── TTT_30.png │ │ ├── TTT_31.png │ │ ├── TTT_32.png │ │ ├── TTT_33.png │ │ ├── TTT_34.png │ │ ├── TTT_35.png │ │ ├── TTT_36.png │ │ ├── TTT_37.png │ │ ├── TTT_37A.png │ │ ├── TTT_38.png │ │ ├── TTT_39.png │ │ └── TTT_40.png │ ├── ttt1 │ │ ├── Screen-Shot-2013-04-13-at-15.29.39.png │ │ └── Screen-Shot-2013-04-13-at-15.30.07.png │ ├── ttt18 │ │ ├── Screen-Shot-2014-05-10-at-17.49.36.png │ │ ├── Screen-Shot-2014-05-10-at-17.55.51.png │ │ ├── Screen-Shot-2014-05-10-at-18.14.12.png │ │ └── Screen-Shot-2014-05-10-at-18.17.19.png │ ├── ttt2 │ │ ├── Screen-Shot-2013-04-26-at-20.47.07.png │ │ ├── Screen-Shot-2013-04-26-at-21.01.29.png │ │ ├── Screen-Shot-2013-04-26-at-21.11.39.png │ │ ├── Screen-Shot-2013-04-26-at-21.16.18.png │ │ └── Screenshot_26_04_2013_20_28.png │ ├── ttt22 │ │ └── exampletxt.png │ ├── ttt23 │ │ └── 512px-IP_stack_connections.svg.png │ ├── ttt24 │ │ ├── 1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png │ │ ├── 512px-IP_stack_connections.svg.png │ │ ├── HomeRouter.png │ │ └── fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png │ ├── ttt25 │ │ ├── 3d970446-33cb-4cc8-8358-5040cb13b8d0.png │ │ ├── HomeNetwork-WirelessAccessPoint-BAD-original.png │ │ ├── HomeNetwork-WirelessAccessPoint-BAD.png │ │ ├── HomeNetwork-WirelessAccessPoint-Good-original.png │ │ ├── HomeNetwork-WirelessAccessPoint-Good.png │ │ ├── HomeRouter.png │ │ └── SubnetWorkflow.png │ ├── ttt27 │ │ ├── DNSHierarchy.png │ │ ├── Screen-Shot-2015-01-16-at-15.00.22-300x241.png │ │ ├── Screen-Shot-2015-01-16-at-15.00.22.png │ │ └── f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png │ ├── ttt29 │ │ └── d411bff4-5d3d-452f-932b-d1176196f32e.png │ ├── ttt31 │ │ └── Screen-Shot-2015-04-04-at-14.53.39.png │ ├── ttt34 │ │ ├── Screen-Shot-2015-05-09-at-17.33.50.png │ │ ├── Screen-Shot-2015-05-09-at-17.33.58.png │ │ ├── Screen-Shot-2015-05-09-at-17.34.54.png │ │ └── Screen-Shot-2015-05-09-at-17.51.48.png │ ├── ttt38 │ │ ├── Screenshot-2020-07-11-at-12.59.30.png │ │ ├── Screenshot-2020-07-11-at-13.43.52.png │ │ └── Screenshot-2020-07-11-at-16.15.55.png │ ├── ttt39 │ │ └── Screenshot-2020-07-25-at-16.52.40.png │ ├── ttt4 │ │ └── Screen-Shot-2013-05-11-at-18.52.30.png │ └── ttt6 │ │ └── Basic_Unix_File_Permission_Masks.png ├── book.html ├── browserconfig.xml ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── index.html ├── mstile-150x150.png ├── safari-pinned-tab.svg ├── series.json └── site.webmanifest ├── package-lock.json ├── package.json ├── publish ├── cover │ ├── FINAL Taming the Terminal book cover art.png │ ├── Screenshot 2020-04-13 at 11.24.38.png │ ├── TTT-Logo.jpg │ ├── TTT-Logo.png │ ├── cover-old.jpg │ ├── cover.afdesign │ ├── cover2.afdesign │ ├── cover2.png │ ├── cover3.afdesign │ └── cover3.png ├── mp3_files └── publish.sh ├── release.json ├── scripts ├── generate-redirects-bartb_ie.js ├── generate_qrcode.sh ├── grep_mp3.sh └── test_release-info.sh ├── taming-the-terminal.komodoproject └── tttconvert ├── .gitignore ├── LICENSE ├── README.md ├── index.js ├── lib ├── customrules.js ├── files.js └── preparebody.js ├── package-lock.json ├── package.json ├── tt.sh └── tttconvert.sh /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | 12 | # 4 space indentation 13 | [*.json] 14 | indent_style = space 15 | indent_size = 4 16 | 17 | # Matches the exact files either package.json or .travis.yml 18 | [{package.json,.travis.yml}] 19 | indent_style = space 20 | indent_size = 2 21 | -------------------------------------------------------------------------------- /.github/styles/Spelling/Ignores.yml: -------------------------------------------------------------------------------- 1 | extends: spelling 2 | aff: /usr/share/hunspell/en_GB.aff 3 | dic: /usr/share/hunspell/en_GB.dic 4 | message: "Did you really mean '%s'?" 5 | level: error 6 | ignore: ../vocab.txt 7 | -------------------------------------------------------------------------------- /.github/styles/vocab.txt: -------------------------------------------------------------------------------- 1 | Adium 2 | adoc 3 | asciidoc 4 | asciidoctor 5 | autoplay 6 | backgrounded 7 | backgrounding 8 | backronym 9 | bart 10 | bbusschots 11 | bitwise 12 | Bonjour 13 | boolean 14 | breakpoint 15 | builtins 16 | bundler 17 | Busschots 18 | Capitan 19 | cardinalities 20 | chown 21 | cloudbased 22 | cmd 23 | commandkey 24 | Commandline 25 | computery 26 | config 27 | cron 28 | crontab 29 | csh 30 | customisable 31 | datagram 32 | datagrams 33 | Dev 34 | distros 35 | ebook 36 | Englishy 37 | ethernet 38 | expanders 39 | experimentations 40 | firewire 41 | Fong 42 | fridgeoven 43 | Gemfile 44 | Ghostbusters 45 | GitHub 46 | hardcoded 47 | Helma 48 | hostname 49 | hostnames 50 | http 51 | https 52 | internets 53 | internetwork 54 | kbd 55 | Komodo 56 | ksh 57 | lego 58 | localdomain 59 | longdash 60 | lookups 61 | loopback 62 | lossy 63 | Magick 64 | malarky 65 | mdfind 66 | menubar 67 | misconfiguration 68 | multitasker 69 | myrouter 70 | namespace 71 | nerdery 72 | netizens 73 | netmask 74 | netmasks 75 | Nosillacast 76 | Noto 77 | ors 78 | pbs 79 | plist 80 | Podcast 81 | podcatchers 82 | podfeet 83 | Powershell 84 | prepending 85 | pwd 86 | raison 87 | redirections 88 | redownload 89 | reimplemented 90 | renamers 91 | revdate 92 | revnumber 93 | routable 94 | rsync 95 | scp 96 | Sess 97 | Smultron 98 | spacebar 99 | subexpression 100 | subexpressions 101 | subnet 102 | subnets 103 | subnetworks 104 | subprotocol 105 | subprotocols 106 | subshell 107 | subshells 108 | subwindow 109 | syslog 110 | tcpdump 111 | tcsh 112 | teleports 113 | tmux 114 | toggleable 115 | traceroute 116 | transcoding 117 | ttt 118 | unencrypted 119 | unintimidating 120 | unintuitive 121 | unroutable 122 | untrusted 123 | webapp 124 | webmail 125 | webmin 126 | webserver 127 | wifi 128 | wrapup 129 | www 130 | zsh 131 | -------------------------------------------------------------------------------- /.github/workflows/publishing.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | on: 3 | schedule: 4 | # - cron: '*/5 * * * *' 5 | - cron: "0 6 * * *" # Nightly, run at 06:00 UTC 6 | push: 7 | paths: 8 | - "release.json" # Push events when this file is changed 9 | tags: 10 | - "v*" # Push events to matching v*, i.e. v1.0, v2.0 11 | jobs: 12 | build: 13 | if: > 14 | github.repository_owner == 'bartificer' 15 | || startsWith(github.ref, 'refs/heads/ci/test/') 16 | || startsWith(github.ref, 'refs/tags/') 17 | runs-on: ubuntu-latest 18 | outputs: 19 | version: ${{ steps.release_info.outputs.version }} 20 | tag: ${{ steps.release_info.outputs.tag }} 21 | date: ${{ steps.release_info.outputs.date }} 22 | download_url: ${{ steps.publish_release.outputs.browser_download_url }} 23 | steps: 24 | - name: Activity check 25 | shell: bash 26 | run: | 27 | # check if we need to build 28 | D=86400 # 24 hours in seconds 29 | 30 | lastcommit="$(curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/commits | jq -r '[.[] | select (.commit.message != "Updating docs") ][0].commit.author.date')" 31 | timestamp=$(date -u -d "$lastcommit" +%s) 32 | days=$(( ( $(date -u +%s) - $timestamp ) / $D )) 33 | worktodo=1 34 | echo "lastcommit: $lastcommit" 35 | echo "timestamp: $timestamp" 36 | echo "days: $days" 37 | if [[ $days -gt 0 && $GITHUB_EVENT_NAME == 'schedule' ]]; then 38 | echo "nothing to do, last 'human' commit was $days days ago" 39 | worktodo=0 40 | fi 41 | echo "worktodo: $worktodo" 42 | echo "GHA_WORK_TO_DO=$worktodo" >> $GITHUB_ENV 43 | 44 | - name: Setup Ruby 45 | if: env.GHA_WORK_TO_DO == 1 46 | uses: actions/setup-ruby@v1 47 | with: 48 | ruby-version: "2.7" 49 | 50 | - name: Checkout 51 | if: env.GHA_WORK_TO_DO == 1 52 | uses: actions/checkout@v2 53 | 54 | - name: Get release information 55 | if: env.GHA_WORK_TO_DO == 1 56 | id: release_info 57 | run: python3 ci/release-info.py "$GITHUB_EVENT_NAME" 58 | 59 | - if: ${{ steps.release_info.outputs.release_type == 'nightly' }} && env.GHA_WORK_TO_DO == 1 60 | name: Delete existing nightly releases 61 | continue-on-error: true 62 | env: 63 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 64 | run: | 65 | set +e 66 | git ls-remote --tags --refs origin 'refs/tags/nightly*' | 67 | cut -f 2 | 68 | while read ref; do 69 | hub release delete ${ref#refs/tags/} 70 | git push --delete origin $ref 71 | done 72 | 73 | # - name: Setup tmate session 74 | # uses: mxschmitt/action-tmate@v2 75 | 76 | - name: Run bundle install 77 | if: env.GHA_WORK_TO_DO == 1 78 | run: | 79 | gem install bundler 80 | bundle install 81 | 82 | - name: Publish the book 83 | if: env.GHA_WORK_TO_DO == 1 84 | run: bundle exec rake 85 | 86 | - name: Commit changes 87 | if: env.GHA_WORK_TO_DO == 1 88 | uses: EndBug/add-and-commit@v4 89 | with: 90 | message: "Updating docs" 91 | add: "docs" 92 | 93 | - name: Upload binaries to release 94 | if: env.GHA_WORK_TO_DO == 1 95 | id: publish_release 96 | uses: svenstaro/upload-release-action@v2 97 | with: 98 | repo_token: ${{ secrets.GITHUB_TOKEN }} 99 | file: output/ttt* 100 | tag: ${{ steps.release_info.outputs.tag }} 101 | overwrite: true 102 | prerelease: ${{ steps.release_info.outputs.prerelease }} 103 | file_glob: true 104 | 105 | - name: Create a Slack message 106 | if: env.GHA_WORK_TO_DO == 1 107 | env: 108 | msg_tag: ${{ steps.release_info.outputs.tag }} 109 | msg_url: ${{ steps.release_info.outputs.browser_download_url }} 110 | run: | 111 | msg='Release ' 112 | if [[ ${{ steps.release_info.outputs.release_type == 'nightly' }} ]]; then 113 | msg='Prerelease ' 114 | fi 115 | msg="${msg} ${msg_tag} is built. 116 | Available at ${msg_url} 117 | " 118 | echo 'TTT_BUILD<> $GITHUB_ENV 119 | echo "$msg" >> $GITHUB_ENV 120 | echo 'EOF' >> $GITHUB_ENV 121 | 122 | # - name: notify Slack 123 | # if: env.GHA_WORK_TO_DO == 1 124 | # uses: uses: rtCamp/action-slack-notify@v2.1.0 125 | # env: 126 | # SLACK_WEBHOOK: ${{ secrets.SLACK_TTT_UPDATES }} 127 | # SLACK_USERNAME: 'githubbot' 128 | # SLACK_ICON_EMOJI: ':genie:' 129 | # MSG_MINIMAL: true 130 | # SLACK_MESSAGE: ${{ env.TTT_BUILD }} 131 | -------------------------------------------------------------------------------- /.github/workflows/vale-linter.yml: -------------------------------------------------------------------------------- 1 | name: Linting 2 | on: [push] 3 | 4 | jobs: 5 | prose: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checkout 9 | uses: actions/checkout@v2 10 | 11 | - name: Vale 12 | uses: errata-ai/vale-action@v1.3.0 13 | with: 14 | styles: | 15 | https://github.com/errata-ai/Microsoft/releases/latest/download/Microsoft.zip 16 | https://github.com/errata-ai/write-good/releases/latest/download/write-good.zip 17 | https://github.com/errata-ai/proselint/releases/latest/download/proselint.zip 18 | files: book 19 | debug: false 20 | env: 21 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | sourcefiles 2 | convert2 3 | book/output 4 | .ruby-version 5 | contributors.txt 6 | output 7 | node_modules 8 | todo.tasks 9 | Ubuntu_Mono.zip 10 | Roboto.zip 11 | archive/* 12 | ttt.code-workspace 13 | 14 | .DS_Store 15 | 16 | *.komodoproject 17 | docs/.DS_Store 18 | -------------------------------------------------------------------------------- /.vale.ini: -------------------------------------------------------------------------------- 1 | StylesPath = .github/styles 2 | MinAlertLevel = suggestion 3 | 4 | [./*.md] 5 | BasedOnStyles = Vale 6 | Vale.Spelling = YES 7 | 8 | [book/*.adoc] 9 | BasedOnStyles = Vale 10 | Vale.Spelling = YES 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## V1.5 4 | 5 | - Episode 37A updated with a supplemental section 6 | 7 | ## V1.4 8 | 9 | - vale-linter updated 10 | - typos fixed 11 | - Kindle version is no more available 12 | - steps to convert to Kindle version by yourself are added 13 | - PDF version in A5 added for reading on smaller devices 14 | - #86 fixing link color in dark mode of Apple Books once again 15 | - #85 fxing font resize problem in Apple Books once again 16 | 17 | ## V1.3 18 | 19 | - remove line numbers in long code listings 20 | - create setup for ttt.bartificer.net website 21 | - #74 font should now be able to resize in Apple Books 22 | - #73 update notice added to colophon 23 | - #77 improved build script 24 | - #75 fixing bugs in installation and build steps 25 | - #76 fix link color in dark mode of Apple Books 26 | - add episode TTT40 27 | - #80 patch with typos applied 28 | - #78 afterword added 29 | 30 | ## V1.2 31 | 32 | - ready for upload to Apple Books 33 | - Apple Command Key symbol fixed in PDF version 34 | - typo in cover fixed 35 | 36 | ## V1.1 37 | 38 | - cleaning up 39 | - 2 ePub versions created 40 | - Kindle version created 41 | 42 | ## V1.0 43 | 44 | Initial release 45 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rake' 4 | gem 'asciidoctor', '~>2.0' 5 | 6 | gem 'json' 7 | gem 'awesome_print' 8 | 9 | gem 'asciidoctor-epub3', '~> 1.5.0.alpha.18' 10 | gem 'asciidoctor-pdf', '~> 1.5.3' 11 | 12 | gem 'coderay' 13 | gem 'pygments.rb' 14 | gem 'rouge', '~> 3.19' 15 | gem 'thread_safe' 16 | gem 'epubcheck-ruby', '~> 4.2.2.0' 17 | # gem 'kindlegen' 18 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | Ascii85 (1.0.3) 5 | addressable (2.7.0) 6 | public_suffix (>= 2.0.2, < 5.0) 7 | afm (0.2.2) 8 | asciidoctor (2.0.10) 9 | asciidoctor-epub3 (1.5.0.alpha.18) 10 | asciidoctor (>= 1.5.6, < 3.0.0) 11 | gepub (~> 1.0.0) 12 | mime-types (~> 3.0) 13 | asciidoctor-pdf (1.5.3) 14 | asciidoctor (>= 1.5.3, < 3.0.0) 15 | concurrent-ruby (~> 1.1.0) 16 | prawn (~> 2.2.0) 17 | prawn-icon (~> 2.5.0) 18 | prawn-svg (~> 0.30.0) 19 | prawn-table (~> 0.2.0) 20 | prawn-templates (~> 0.1.0) 21 | safe_yaml (~> 1.0.0) 22 | thread_safe (~> 0.3.0) 23 | treetop (~> 1.6.0) 24 | ttfunk (~> 1.5.0, >= 1.5.1) 25 | awesome_print (1.8.0) 26 | coderay (1.1.3) 27 | concurrent-ruby (1.1.7) 28 | css_parser (1.7.1) 29 | addressable 30 | epubcheck-ruby (4.2.2.0) 31 | gepub (1.0.13) 32 | nokogiri (>= 1.8.2, < 1.12) 33 | rubyzip (> 1.1.1, < 2.4) 34 | hashery (2.1.2) 35 | json (2.3.1) 36 | mime-types (3.3.1) 37 | mime-types-data (~> 3.2015) 38 | mime-types-data (3.2020.0512) 39 | mini_portile2 (2.5.0) 40 | multi_json (1.15.0) 41 | nokogiri (1.11.1) 42 | mini_portile2 (~> 2.5.0) 43 | racc (~> 1.4) 44 | pdf-core (0.7.0) 45 | pdf-reader (2.4.0) 46 | Ascii85 (~> 1.0.0) 47 | afm (~> 0.2.1) 48 | hashery (~> 2.0) 49 | ruby-rc4 50 | ttfunk 51 | polyglot (0.3.5) 52 | prawn (2.2.2) 53 | pdf-core (~> 0.7.0) 54 | ttfunk (~> 1.5) 55 | prawn-icon (2.5.0) 56 | prawn (>= 1.1.0, < 3.0.0) 57 | prawn-svg (0.30.0) 58 | css_parser (~> 1.6) 59 | prawn (>= 0.11.1, < 3) 60 | prawn-table (0.2.2) 61 | prawn (>= 1.3.0, < 3.0.0) 62 | prawn-templates (0.1.2) 63 | pdf-reader (~> 2.0) 64 | prawn (~> 2.2) 65 | public_suffix (4.0.5) 66 | pygments.rb (1.2.1) 67 | multi_json (>= 1.0.0) 68 | racc (1.5.2) 69 | rake (13.0.1) 70 | rouge (3.22.0) 71 | ruby-rc4 (0.1.5) 72 | rubyzip (2.3.0) 73 | safe_yaml (1.0.5) 74 | thread_safe (0.3.6) 75 | treetop (1.6.10) 76 | polyglot (~> 0.3) 77 | ttfunk (1.5.1) 78 | 79 | PLATFORMS 80 | ruby 81 | 82 | DEPENDENCIES 83 | asciidoctor (~> 2.0) 84 | asciidoctor-epub3 (~> 1.5.0.alpha.18) 85 | asciidoctor-pdf (~> 1.5.3) 86 | awesome_print 87 | coderay 88 | epubcheck-ruby (~> 4.2.2.0) 89 | json 90 | pygments.rb 91 | rake 92 | rouge (~> 3.19) 93 | thread_safe 94 | 95 | BUNDLED WITH 96 | 2.1.4 97 | -------------------------------------------------------------------------------- /INSTALLATION.md: -------------------------------------------------------------------------------- 1 | # Creating the TTT publications 2 | 3 | This file contains the instructions of how to build the various ebook formats of the Taming the Terminal tutorial. 4 | 5 | ## How it works 6 | 7 | Download the HTML file of the episode and convert it to Markdown using the tttconvert code. 8 | Then, convert the Markdown to Asciidoctor using Kramdoc. 9 | Once you've set up all the necessary tools, you can simply build all three versions using the command 10 | 11 | `bundle exec rake book:build` 12 | 13 | To get there you need: 14 | 15 | - Ruby as a separate install (because you don't want to mess up your System folder) 16 | - various gems 17 | - bundler 18 | - rake 19 | - asciidoctor 20 | - asciidoctor-epub3 21 | - asciidoctor-pdf 22 | - clone the GitHub repository 23 | 24 | ## Prepare your environment 25 | 26 | ### Install NodeJS 27 | 28 | Install NodeJS version 12.x.x or later. Follow the instructions on [nodejs.org](https://nodejs.org/en/). 29 | 30 | ### Install Ruby on macOS 31 | 32 | Ruby is default part of macOS but every `gem install ` will lead to an attempt to update the system framework. Not a good idea. 33 | 34 | Follow the instructions at: [GoRails.com](https://gorails.com/setup/osx/10.15-catalina) 35 | 36 | just the part 'Installing Ruby' 37 | 38 | ### Install Kramdoc 39 | 40 | Install Kramdoc using 41 | 42 | ```shell 43 | gem install kramdown-asciidoc 44 | ``` 45 | 46 | more information at [Convert Markdown to AsciiDoc](https://matthewsetter.com/technical-documentation/asciidoc/convert-markdown-to-asciidoc-with-kramdoc/) 47 | 48 | ### Clone the git repository 49 | 50 | Clone the repository 51 | 52 | ```shell 53 | git clone https://github.com/bartificer/taming-the-terminal.git 54 | ``` 55 | 56 | ### Install necessary Ruby gems 57 | 58 | switch to the root directory of the git repository you just cloned and run 59 | 60 | ```shell 61 | bundle install 62 | ``` 63 | 64 | This installs all Ruby gems in the `Gemfile`. 65 | 66 | ### Install the dependencies for the tttconvert program 67 | 68 | ```shell 69 | cd tttconvert 70 | npm install 71 | ``` 72 | 73 | ### Install the QRcode library 74 | 75 | ```shell 76 | npm install 77 | ``` 78 | 79 | ## Compile 80 | 81 | ### Prepare the files 82 | 83 | The original episodes are HTML pages on Bart's website. They need to be converted first to AsciiDoctor file before they can be processed further. This section explains how to do that for a new episode. 84 | 85 | 1. Download the HTML page from Bart's website, use Safari and download it as 'page source'. Save in the `sourcefiles` directory (create this if it's not present). 86 | This ensures the correct naming convention and the original links to the images and other assets. 87 | 88 | 2. Convert HTML to Markdown 89 | 90 | ```shell 91 | cd tttconvert 92 | ./tttconvert.sh xx 93 | # xx is the number of episode, 94 | # leave blank to convert all files 95 | ``` 96 | 97 | This app also downloads the images. Output is in `convert2` and `convert2/assets`. 98 | 99 | 3. Convert to Asciidoctor 100 | 101 | ```shell 102 | cd ../convert2 103 | kramdoc --format=GFM --output=tttXX.adoc tttXX.md 104 | ``` 105 | 106 | 4. Copy the Asciidoctor files + assets to the book 107 | 108 | ```shell 109 | cd ../convert2 110 | cp tttXX.adoc ../book # XX is the file you want to copy 111 | cp -r assets/tttXX ../book/assets 112 | ``` 113 | 114 | 5. Make the QRcode 115 | 116 | - open book/tttXXX.adoc 117 | - copy the link to the podcast to the file `publish/mp3_files 118 | - run the script 119 | 120 | ```shell 121 | cd ../scripts 122 | ./generate_qrcode.sh 123 | ``` 124 | 125 | 6. Cleanup 126 | 127 | - add the new tttXX.adoc file to `book/ttt-contents.adoc` 128 | - if necessary, rename the QRcode file to match the TTT_XX.png naming convention 129 | - open the `book/tttXX.adoc` file and fix the episode box, the reference to the QRcode and miscellaneous changes. 130 | 131 | ### Build the files 132 | 133 | Test if your setup works by running 134 | 135 | ```shell 136 | bundle exec rake book:build 137 | ``` 138 | 139 | or simply 140 | 141 | ```shell 142 | bundle exec rake 143 | ``` 144 | 145 | because `book:build` is the default. 146 | 147 | When it finishes, the output looks like this: 148 | 149 | ```shell 150 | Generating contributors list 151 | 152 | Converting to HTML... 153 | -- HTML output at output/ttt.html 154 | Sync the assets 155 | 156 | Converting to EPub... 157 | -- Epub output at output/ttt.epub 158 | 159 | Converting to PDF A4... (this one takes a while) 160 | -- PDF output at output/ttt.pdf 161 | 162 | Converting to PDF US... (this one takes a while) 163 | -- PDF output at output/ttt-us.pdf 164 | ``` 165 | 166 | and no other errors, there should be a PDF in A4-size, a PDF in Letter-size, an HTML file and an ePub file in the `output` directory. 167 | Assets are already synced by the build script. 168 | 169 | ## Favicons 170 | 171 | The favicons are generated by uploading a PNG version of the logo on https://realfavicongenerator.net. 172 | The icon for the Touchbar icon and the pinned tab in Safari is set to 'Turn your picture into a monochrome icon ....' 173 | Threshold is set one step to the right. 174 | The background color is set to #29c943. 175 | 176 | ## Book setup 177 | 178 | Every episode is put in its own file in the `book` directory. All images are in 179 | `book/assets/ttt`. 180 | 181 | `ttt-spine.adoc` and `ttt-contents.adoc` hold the general information to pull the content together in one output file. 182 | 183 | For now: 184 | 185 | - `index.asc` is empty, it's just there because the spine docs refer to it. Not sure if we need to fill it. Because the entries are only visible in the PDF, the entire section is commented out. 186 | 187 | Note: language is **_British English_**! 188 | 189 | ## Bug fixes and workaround 190 | 191 | This section contains some notes on bug fixes and workarounds that have been applied to get it working. 192 | 193 | ### Fake second paragraph 194 | 195 | See: [Asciidoctor git repository](https://github.com/asciidoctor/asciidoctor/issues/2860) 196 | Worked around by adding a second paragraph either by separating the last (few) sentence(s) or by adding an invisible second paragraph consisting of a single space. 197 | 198 | ```asciidoc 199 | +++ +++ 200 | ``` 201 | 202 | Books doesn't like this, so I had to surround it with `ifdef`s: 203 | 204 | ```asciidoc 205 | ifndef::backend-epub3[] 206 | +++ +++ 207 | endif::[] 208 | ``` 209 | 210 | **Update 2020-05-01**: Since the audio section was converted to a sidebar, that counts as a second paragraph, so all the fake second paragraphs are deleted. 211 | 212 | ### Backticks problems 213 | 214 | Somehow there is a bug in `asciidoctor` that causes backticks to be passed through rather than marking the conversion to `monospace`. 215 | 216 | ### Color coding in ePub 217 | 218 | `Rouge` is used as source code highlighter in PDF and HTML, but it doesn't work in ePub. Only `Pygments` is supported in ePub, but this has no good support for shell scripts. Somehow the color coding in Books actually looks to be just black & white. 219 | 220 | **UPDATE**: it looks like the attribute for the styling in the spine is not honored. It should be added as an attribute on the command line like 221 | 222 | ``` 223 | -a pygments-style=manni 224 | ``` 225 | 226 | Source: [Prepare an asciidoc document](https://asciidoctor.org/docs/asciidoctor-epub3/#prepare-an-asciidoc-document) 227 | 228 | **UPDATE 2020-07-16**: Looks like Rouge _is_ supported now in ePub, _AND_ it gives better colour coding, so all ePub is now also switched to Rouge. 229 | 230 | ### Highlights in source code 231 | 232 | It is not possible to highlight specific parts of the source code, so all references to e.g. `` must be removed from the snippet or it will show up verbatim in the output file. 233 | 234 | **UPDATE 2020-07-16**: highlighting is supported by adding an attribute to the codeblock indicating the lines to be highlighted and by adding appropriate CSS to the various themes. All code blocks that have highlighting in the original html are now marked for highlighting in the Asciidoctor files as well. 235 | 236 | ### Line numbering in source code 237 | 238 | Although Rouge supports line numbering in source code blocks, the implementation in Asciidoctor is very simple. The code is placed in 2 table cells, one with the line numbers, one with the code. It doesn't take into account the extra space needed when long code lines wrap to the next line. 239 | After numerous attempts to fix the problem I got stuck because my code adjustments in the Asciidoctor code broke the functionality to add annotations in the code and I haven't found a way to preserve that functionality. 240 | I therefore decided to skip the line numbering in code blocks that have long lines of mostly output. The highlighting does work, therefore it's still possible to point out the important lines. 241 | 242 | **UPDATE 2020-07-29**: line numbering is removed altogether for the ePub version, because the epubcheck throws errors. 243 | 244 | ### Keyboard shortcuts 245 | 246 | Asciidoctor supports the HTML5 keyboard shortcuts, so change any reference to keyboard shortcuts to the HTML5 keyboard counterparts. 247 | Note, the command key (CMD) can be used as `{commandkey}`. 248 | I added a document with variables to each document so this is automatically taken care of. 249 | 250 | `Ctrl` is used for the 'Control' key, because it's much more commonly used than 'control'. 251 | 252 | NB. with the codes in the following table it's possible to create `kbd:[←]` arrow keys. 253 | 254 | | Unicode | HTML entity | Symbol | Name | 255 | | --------- | ----------- | ------ | ----------- | 256 | | `→` | `→` | → | Right arrow | 257 | | `←` | `←` | ← | Left arrow | 258 | | `↑` | `↑` | ↑ | Up arrow | 259 | | `↓` | `↓` | ↓ | Down arrow | 260 | 261 | However, ePub doesn't support the HTML entities definitions, PDF doesn't support the Unicode definitions for the up and down arrows. So I've decided to skip them entirely and just use the words 'up', 'down' etc. 262 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Vale Linting](https://github.com/hepabolu/ttt/workflows/Linting/badge.svg) 2 | 3 | # Creating the TTT publications 4 | 5 | This repository contains all the content of the Taming the Terminal tutorial as well as the scripts that are needed to build the output. 6 | 7 | Please note this book is written in British English 8 | 9 | Instructions on how to build the ebooks are in the INSTALLATION.md file. 10 | 11 | Under Releases you will find all the ebook versions of this tutorial. 12 | 13 | | Format | Description | 14 | | --------------- | ---------------------------------------- | 15 | | ttt.epub | ePub without audioplayer | 16 | | ttt-audio.epub | ePub with inline audioplayer | 17 | | ttt.mobi | Kindle version - not available for now\* | 18 | | ttt.pdf | PDF with pages in A4 size | 19 | | ttt-us.pdf | PDF with pages in Letter size | 20 | | ttt-A5.pdf | PDF with pages in A5 size | 21 | | ttt_html.zip | single page HTML version with assets | 22 | 23 | Note, for the HTML version you need to download the ttt_all.zip. This zip not only contains the 4 output formats, but also the images for the HTML version. 24 | 25 | - As of 2020-09-10 this version will not be provided, because the Amazon plugin to build it is no longer available. If a new solution is available, this version will be added again. 26 | For now if you require a Mobi format, download ttt.pdf and use a free service like Zamzar to convert it to Mobi and then follow Amazon's instructions to email the book to your Kindle. 27 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | namespace :book do 2 | desc 'build basic book formats' 3 | task :build do 4 | 5 | begin 6 | 7 | book_dir = 'book' 8 | output_dir = 'output' 9 | 10 | version_string = `grep '"version":' release.json | cut -d: -f2 | cut -d'"' -f2`.chomp 11 | if version_string.empty? 12 | version_string = '1.0' 13 | end 14 | date_string = Time.now.strftime("%Y-%m-%d") 15 | compile_time = Time.now.strftime("%Y-%m-%d %k-%M-%S") 16 | 17 | # general parameters 18 | paramsAttr = { 19 | 'revnumber'=> version_string, 20 | 'revdate' => date_string, 21 | 'compile_time' => compile_time 22 | } 23 | paramsHash = { 24 | 'destination-dir' => "#{output_dir}" 25 | } 26 | 27 | # HTML specific parameters 28 | 29 | htmlParams = paramsHash.merge({ 30 | 'attribute' => paramsAttr.merge({ 31 | # 'stylesdir'=>'theme', 32 | # 'stylesheet'=>'bartificer.css' 33 | }), 34 | 'out-file' => 'ttt.html' 35 | }) 36 | 37 | # ePub specific parameters 38 | epubParams = paramsHash.merge({ 39 | 'attribute' => paramsAttr.merge({ 40 | # 'ebook-validate' => '', 41 | 'epub3-stylesdir' => "'theme/epub'", 42 | 'pygments-style' => 'manni', 43 | 'pygments-linenums-mode' => 'inline', 44 | 'troubleshoot' => '1' 45 | }), 46 | 'out-file' => 'ttt.epub' 47 | }) 48 | 49 | # mobi specific parameters 50 | mobiParams = paramsHash.merge({ 51 | 'attribute' => paramsAttr.merge({ 52 | 'epub3-stylesdir' => "'theme/epub'", 53 | 'pygments-style' => 'manni', 54 | 'pygments-linenums-mode' => 'inline', 55 | 'ebook-format' => 'kf8', 56 | 'apple-books' => '1' 57 | }), 58 | 'out-file' => 'ttt.mobi' 59 | }) 60 | 61 | # PDF specific parameters 62 | pdfParams = paramsHash.merge({ 63 | 'attribute' => paramsAttr.merge({ 64 | 'pdf-themesdir' => "'#{book_dir}/theme/pdf'", 65 | 'pdf-fontsdir' => "'#{book_dir}/theme/fonts,GEM_FONTS_DIR'", 66 | 'pdf-theme' => 'bartificer' 67 | }), 68 | 'out-file' => 'ttt.pdf', 69 | }) 70 | 71 | def buildParams(params) 72 | result = '' 73 | params.each do |key, value| 74 | if key == 'attribute' 75 | value.each do | k, val | 76 | result = result + " -a #{k}='#{val}'" 77 | end 78 | else 79 | result = result +" --#{key}='#{value}'" 80 | end 81 | end 82 | return result 83 | end 84 | 85 | puts "Generating contributors list" 86 | `git shortlog -es | cut -f 2- > #{book_dir}/contributors.txt` 87 | 88 | puts "\nConverting to HTML..." 89 | `bundle exec asciidoctor #{buildParams(htmlParams)} #{book_dir}/ttt-spine.adoc` 90 | puts " -- HTML output at #{htmlParams['destination-dir']}/#{htmlParams['out-file']}" 91 | 92 | puts "Sync the assets" 93 | `rsync -r --delete book/assets/* output/assets/` 94 | `mkdir -p docs/assets` 95 | `rsync -r --delete book/assets/* docs/assets/` 96 | 97 | puts "Update the website" 98 | `cp #{htmlParams['destination-dir']}/#{htmlParams['out-file']} docs/book.html` 99 | 100 | puts "\nConverting to EPub..." 101 | `bundle exec asciidoctor-epub3 #{buildParams(epubParams)} #{book_dir}/ttt-spine.adoc` 102 | puts " -- Epub output at #{epubParams['destination-dir']}/#{epubParams['out-file']}" 103 | 104 | # puts "\nFixing references to podcasts in ePub package.opf file" 105 | # `scripts/fix-epub.sh` 106 | 107 | puts "Validating ePub" 108 | `epubcheck #{epubParams['destination-dir']}/#{epubParams['out-file']} -e` 109 | 110 | `mv #{epubParams['destination-dir']}/#{epubParams['out-file']} #{epubParams['destination-dir']}/ttt-audio.epub` 111 | 112 | puts "\nConverting to EPub without audio..." 113 | `bundle exec asciidoctor-epub3 #{buildParams(epubParams)} -a 'apple-books=1' #{book_dir}/ttt-spine.adoc` 114 | puts " -- Epub output at #{epubParams['destination-dir']}/#{epubParams['out-file']}" 115 | 116 | puts "Validating ePub" 117 | `epubcheck #{epubParams['destination-dir']}/#{epubParams['out-file']} -e` 118 | 119 | # puts "\nConverting to Mobi (kf8)..." 120 | # `bundle exec asciidoctor-epub3 #{buildParams(mobiParams)} #{book_dir}/ttt-spine.adoc` 121 | # puts " -- Mobi output at #{mobiParams['destination-dir']}/#{mobiParams['out-file']}" 122 | 123 | # # removing the ttt-kf8.epub version, because it doesn't have any function 124 | # `rm #{mobiParams['destination-dir']}/ttt-kf8.epub` 125 | 126 | puts "\nConverting to PDF A4... (this one takes a while)" 127 | `bundle exec asciidoctor-pdf #{buildParams(pdfParams)} #{book_dir}/ttt-spine.adoc` 128 | # 2>/dev/null` 129 | puts " -- PDF output at #{pdfParams['destination-dir']}/#{pdfParams['out-file']}" 130 | 131 | params = pdfParams 132 | params['out-file'] = 'ttt-us.pdf' 133 | params['attribute']['pdf-theme'] = 'bartificer-us' 134 | 135 | puts "\nConverting to PDF US... (this one takes a while)" 136 | `bundle exec asciidoctor-pdf #{buildParams(params)} --trace #{book_dir}/ttt-spine.adoc` 137 | # 2>/dev/null` 138 | puts " -- PDF output at #{params['destination-dir']}/#{params['out-file']}" 139 | 140 | params = pdfParams 141 | params['out-file'] = 'ttt-a5.pdf' 142 | params['attribute']['pdf-theme'] = 'bartificer-a5' 143 | 144 | puts "\nConverting to PDF A5... (this one takes a while)" 145 | `bundle exec asciidoctor-pdf #{buildParams(params)} --trace #{book_dir}/ttt-spine.adoc` 146 | # 2>/dev/null` 147 | puts " -- PDF output at #{params['destination-dir']}/#{params['out-file']}" 148 | 149 | puts "\nZip the html version" 150 | `zip -r output/ttt_html.zip output/ttt.html output/assets` 151 | 152 | puts "\nZip everything except the html zip" 153 | `zip -r output/ttt_all.zip output/ttt*.[a-y]* output/assets` 154 | 155 | puts"\nRemove the ttt.html file because we have already a zipped version which includes the assets" 156 | `rm #{htmlParams['destination-dir']}/#{htmlParams['out-file']}` 157 | end 158 | end 159 | end 160 | 161 | task :default => "book:build" 162 | -------------------------------------------------------------------------------- /additional.md: -------------------------------------------------------------------------------- 1 | # Additional information 2 | 3 | This document contains additional information that might be of interest to a few people but does not contain any information about the tutorial itself or how to compile it. 4 | 5 | ## Why asciidoctor? 6 | 7 | The request was to build an ePub out of the episodes. That meant these requirements: 8 | 9 | - keep the code blocks with source code highlighting 10 | - keep the definition lists 11 | - create a single ePub of all the separate chapters 12 | - add a Table of Contents 13 | 14 | At first the original HTML pages were converted to Github Flavor Markdown, basically with a slightly modified version of pbsconvert. The initial conversion from Markdown to an ePub was done with pandoc and pygments as source code highlighter. 15 | From experience I know that Markdown doesn't support definition lists, and Bart explicitly mentioned once that he likes definition lists so it would be a shame to convert them all to a table markup which I did initially. 16 | In hindsight, 3 weeks later, I found out I didn't look hard enough at Pandoc's documentation, it DOES support it. 17 | 18 | Pygments, the source code highlighter does have support for Bash or shell scripts, but somehow most builtins are not color coded. Because the earlier episodes mostly use builtins, that would mean there is no color coding at all. 19 | I came across an extension that added these builtins to Pygments, but I wasn't able to convert them to the language and plugin syntax Pandoc could understand. 20 | 21 | In my search for a solution I came across the [Progit](https://github.com/progit/progit) eBook repository. They referred to their second version [Progit 2](https://github.com/progit/progit2) which mentioned that they switched to Asciidoc. Curious, I googled some more and came across this page [Convert Markdown to Asciidoctor with PanDoc](https://matthewsetter.com/convert-markdown-to-asciidoc-withpandoc/) and the 22 | [Asciidoctor](https://asciidoctor.org) website. 23 | It solved many of my problems: 24 | 25 | - definition lists 26 | - support for various source code highlighters, including Pygments, which also support shell scripts 27 | - and the Progit 2 project had a script file that could generate an ePub as well as a PDF and a single page HTML. 28 | 29 | I converted an episode by hand, Markdown and Asciidoctor have very similar syntax, and ran it through the build script. Lo and behold there was nice color coding. And the switch to Rouge, another syntax highlighter was even easier and provided also color coding for the builtins. 30 | 31 | The decision was made, TTT would be in Asciidoctor. 32 | 33 | Note: it turned out to be easier to convert Markdown to Asciidoctor using [Kramdoc-Asciidoc](https://matthewsetter.com/technical-documentation/asciidoc/convert-markdown-to-asciidoc-with-kramdoc/). 34 | 35 | ## Links 36 | 37 | This section contains additional links that might be relevant to the publications: 38 | 39 | - https://itunespartner.apple.com/books/articles/create-book-cover-art-2712 40 | - https://help.apple.com/itc/booksassetguide/#/itc04314e64a 41 | - https://blog.kotobee.com/publishing-amazon-ibookstore-10-things-watch/ 42 | - https://www.w3.org/publishing/epub32/epub-packages.html#elemdef-opf-package 43 | - https://w3c.github.io/publ-epub-revision/epub32/spec/epub-packages.html#attrdef-item-fallback 44 | - https://github.com/krisztianmukli/epub-boilerplate/blob/master/publish-ebook 45 | - https://matthewsetter.com/writing-tools/npm-broken-link-checker/ 46 | -------------------------------------------------------------------------------- /book/assets/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/cover.png -------------------------------------------------------------------------------- /book/assets/creativecommons.org_by-nc-nd_4.0_88x31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/creativecommons.org_by-nc-nd_4.0_88x31.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_01.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_02.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_03.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_04.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_05.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_06.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_07.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_08.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_09.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_10.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_11.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_12.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_13.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_14.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_15.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_16.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_17.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_18a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_18a.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_18b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_18b.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_19.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_20.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_21.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_22.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_23a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_23a.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_23b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_23b.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_24.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_25a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_25a.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_25b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_25b.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_26.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_27a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_27a.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_27b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_27b.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_28.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_29.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_30.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_31.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_32.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_33.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_34.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_35.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_36.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_37.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_37A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_37A.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_38.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_39.png -------------------------------------------------------------------------------- /book/assets/qrcodes/TTT_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/qrcodes/TTT_40.png -------------------------------------------------------------------------------- /book/assets/ttt1/Screen-Shot-2013-04-13-at-15.29.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt1/Screen-Shot-2013-04-13-at-15.29.39.png -------------------------------------------------------------------------------- /book/assets/ttt1/Screen-Shot-2013-04-13-at-15.30.07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt1/Screen-Shot-2013-04-13-at-15.30.07.png -------------------------------------------------------------------------------- /book/assets/ttt18/Screen-Shot-2014-05-10-at-17.49.36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt18/Screen-Shot-2014-05-10-at-17.49.36.png -------------------------------------------------------------------------------- /book/assets/ttt18/Screen-Shot-2014-05-10-at-17.55.51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt18/Screen-Shot-2014-05-10-at-17.55.51.png -------------------------------------------------------------------------------- /book/assets/ttt18/Screen-Shot-2014-05-10-at-18.14.12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt18/Screen-Shot-2014-05-10-at-18.14.12.png -------------------------------------------------------------------------------- /book/assets/ttt18/Screen-Shot-2014-05-10-at-18.17.19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt18/Screen-Shot-2014-05-10-at-18.17.19.png -------------------------------------------------------------------------------- /book/assets/ttt2/Screen-Shot-2013-04-26-at-20.47.07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt2/Screen-Shot-2013-04-26-at-20.47.07.png -------------------------------------------------------------------------------- /book/assets/ttt2/Screen-Shot-2013-04-26-at-21.01.29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt2/Screen-Shot-2013-04-26-at-21.01.29.png -------------------------------------------------------------------------------- /book/assets/ttt2/Screen-Shot-2013-04-26-at-21.11.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt2/Screen-Shot-2013-04-26-at-21.11.39.png -------------------------------------------------------------------------------- /book/assets/ttt2/Screen-Shot-2013-04-26-at-21.16.18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt2/Screen-Shot-2013-04-26-at-21.16.18.png -------------------------------------------------------------------------------- /book/assets/ttt2/Screenshot_26_04_2013_20_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt2/Screenshot_26_04_2013_20_28.png -------------------------------------------------------------------------------- /book/assets/ttt22/exampletxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt22/exampletxt.png -------------------------------------------------------------------------------- /book/assets/ttt23/512px-IP_stack_connections.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt23/512px-IP_stack_connections.svg.png -------------------------------------------------------------------------------- /book/assets/ttt24/1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt24/1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png -------------------------------------------------------------------------------- /book/assets/ttt24/512px-IP_stack_connections.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt24/512px-IP_stack_connections.svg.png -------------------------------------------------------------------------------- /book/assets/ttt24/HomeRouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt24/HomeRouter.png -------------------------------------------------------------------------------- /book/assets/ttt24/fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt24/fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png -------------------------------------------------------------------------------- /book/assets/ttt25/3d970446-33cb-4cc8-8358-5040cb13b8d0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/3d970446-33cb-4cc8-8358-5040cb13b8d0.png -------------------------------------------------------------------------------- /book/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD-original.png -------------------------------------------------------------------------------- /book/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD.png -------------------------------------------------------------------------------- /book/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good-original.png -------------------------------------------------------------------------------- /book/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good.png -------------------------------------------------------------------------------- /book/assets/ttt25/HomeRouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/HomeRouter.png -------------------------------------------------------------------------------- /book/assets/ttt25/SubnetWorkflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt25/SubnetWorkflow.png -------------------------------------------------------------------------------- /book/assets/ttt27/DNSHierarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt27/DNSHierarchy.png -------------------------------------------------------------------------------- /book/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22-300x241.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22-300x241.png -------------------------------------------------------------------------------- /book/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22.png -------------------------------------------------------------------------------- /book/assets/ttt27/f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt27/f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png -------------------------------------------------------------------------------- /book/assets/ttt29/d411bff4-5d3d-452f-932b-d1176196f32e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt29/d411bff4-5d3d-452f-932b-d1176196f32e.png -------------------------------------------------------------------------------- /book/assets/ttt31/Screen-Shot-2015-04-04-at-14.53.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt31/Screen-Shot-2015-04-04-at-14.53.39.png -------------------------------------------------------------------------------- /book/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.50.png -------------------------------------------------------------------------------- /book/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.58.png -------------------------------------------------------------------------------- /book/assets/ttt34/Screen-Shot-2015-05-09-at-17.34.54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt34/Screen-Shot-2015-05-09-at-17.34.54.png -------------------------------------------------------------------------------- /book/assets/ttt34/Screen-Shot-2015-05-09-at-17.51.48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt34/Screen-Shot-2015-05-09-at-17.51.48.png -------------------------------------------------------------------------------- /book/assets/ttt38/Screenshot-2020-07-11-at-12.59.30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt38/Screenshot-2020-07-11-at-12.59.30.png -------------------------------------------------------------------------------- /book/assets/ttt38/Screenshot-2020-07-11-at-13.43.52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt38/Screenshot-2020-07-11-at-13.43.52.png -------------------------------------------------------------------------------- /book/assets/ttt38/Screenshot-2020-07-11-at-16.15.55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt38/Screenshot-2020-07-11-at-16.15.55.png -------------------------------------------------------------------------------- /book/assets/ttt39/Screenshot-2020-07-25-at-16.52.40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt39/Screenshot-2020-07-25-at-16.52.40.png -------------------------------------------------------------------------------- /book/assets/ttt4/Screen-Shot-2013-05-11-at-18.52.30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt4/Screen-Shot-2013-05-11-at-18.52.30.png -------------------------------------------------------------------------------- /book/assets/ttt6/Basic_Unix_File_Permission_Masks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/assets/ttt6/Basic_Unix_File_Permission_Masks.png -------------------------------------------------------------------------------- /book/colophon.adoc: -------------------------------------------------------------------------------- 1 | [[colophon]] 2 | = Colophon 3 | 4 | The Podfeet Press 5 | 6 | (C) 2020 by The Podfeet Press 7 | 8 | Published in the Milky Way Galaxy 9 | 10 | Version {revnumber} 11 | 12 | Date revision {revdate} 13 | 14 | _Compiled: {compile_time}_ 15 | 16 | This book is designed and handcrafted by {producer}. 17 | The cover is designed by {cover-artist}. 18 | The font types are Noto Sans and Noto Serif. 19 | 20 | Created in https://asciidoctor.org[Asciidoctor] and macOS. 21 | 22 | [[updates]] 23 | ==== 24 | *Updates* 25 | 26 | This book will be updated whenever new episodes are added or errors are fixed. 27 | You can check if a new update is available at: 28 | {update-url} 29 | ==== 30 | 31 | [[license]] 32 | *Creative Commons license* 33 | 34 | This work is licensed under a http://creativecommons.org/licenses/by-nc-nd/4.0/[Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, rel='license']. 35 | 36 | :imagesdir: assets 37 | [link=http://creativecommons.org/licenses/by-nc-nd/4.0/, rel='license'] 38 | image::creativecommons.org_by-nc-nd_4.0_88x31.png[Creative Commons License] 39 | -------------------------------------------------------------------------------- /book/contributors.adoc: -------------------------------------------------------------------------------- 1 | [contributors] 2 | = Contributors 3 | 4 | include::contributors.txt[] 5 | -------------------------------------------------------------------------------- /book/docinfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /book/index.asc: -------------------------------------------------------------------------------- 1 | [index] 2 | == Index 3 | -------------------------------------------------------------------------------- /book/theme/bartificer.css: -------------------------------------------------------------------------------- 1 | .link { 2 | color: #428BCA; 3 | } 4 | 5 | .literal { 6 | color: #B12146; 7 | } 8 | 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6 { 15 | color: #00408d; 16 | font-family: "Ubuntu Mono", mono; 17 | } 18 | -------------------------------------------------------------------------------- /book/theme/epub/epub3-css3-only.css: -------------------------------------------------------------------------------- 1 | /* It is not possible to include the original epub3-css3-only.css file 2 | * by copying and renaming it and importing it in this file. 3 | * So I'll copy the entire content here and add modifications 4 | * to the bottom. 5 | */ 6 | /* @page is for EPUB2 only */ 7 | @page { 8 | margin: 0; 9 | } 10 | 11 | body.calibre-desktop { 12 | padding: 20pt 0 !important; 13 | } 14 | 15 | body.calibre-desktop>section { 16 | margin: 0 25pt; 17 | } 18 | 19 | /* Gitden & Namo default to 16px font-size; bump it to 19px (118.75%) */ 20 | body.gitden-reader, 21 | body.namo-epub-library { 22 | font-size: 118.75%; 23 | } 24 | 25 | /* Gitden doesn't give us much margin, so let's roughly match Aldiko and Kindle (narrow setting) */ 26 | body.gitden-reader { 27 | margin: 0 5pt !important; 28 | } 29 | 30 | /* Namo has the same margin problem, except setting side margins doesn't work */ 31 | /*body.namo-epub-library > section.chapter { 32 | margin: 0 5pt; 33 | }*/ 34 | 35 | /* Use tighter margins and smaller font (18px) on phones (Nexus 4 and smaller) */ 36 | @media only screen and (max-device-width: 768px) and (max-device-height: 1280px), 37 | only screen and (max-device-width: 1280px) and (max-device-height: 768px) { 38 | 39 | body.gitden-reader, 40 | body.namo-epub-library { 41 | font-size: 112.5%; 42 | } 43 | 44 | /*body.gitden-reader { 45 | margin: 0 5pt !important; 46 | }*/ 47 | /*body.namo-epub-library > section.chapter { 48 | margin: 0 5pt; 49 | }*/ 50 | } 51 | 52 | body.gitden-reader pre { 53 | white-space: pre-wrap !important; 54 | /* Gitden must be applying white-space: pre !important */ 55 | } 56 | 57 | body h1, 58 | body h2, 59 | body h3:not(.list-heading), 60 | body h4, 61 | body h5, 62 | body h6, 63 | h1 :not(code), 64 | h2 :not(code), 65 | h3:not(.list-heading) :not(code), 66 | h4 :not(code), 67 | h5 :not(code), 68 | h6 :not(code) { 69 | /* !important required to override custom font setting in Kindle / Gitden / Namo */ 70 | /* Gitden requires the extra weight of a parent selector; it also makes headings bold when custom font is specified */ 71 | /* Kindle and Gitden require the override on heading child elements */ 72 | font-family: "M+ 1p", sans-serif !important; 73 | } 74 | 75 | /* QUESTION what about nested elements inside code? */ 76 | body code, 77 | body kbd, 78 | body pre, 79 | pre :not(code) { 80 | /* !important required to override custom font setting in Kindle / Gitden / Namo */ 81 | /* Gitden requires the extra weight of a parent selector */ 82 | /* Kindle and Gitden require the override on pre child elements */ 83 | font-family: "M+ 1mn", monospace !important; 84 | } 85 | 86 | @media amzn-kf8 { 87 | 88 | /* Kindle does its own margin management, so don't use an explicit margin */ 89 | /*body { 90 | margin: 0 !important; 91 | }*/ 92 | /* text-rendering is the only way to enable kerning in Kindle (and Calibre, though it seems to kern automatically) */ 93 | /* personally, I think Kindle overdoes kerning, but we're running with it for now */ 94 | /* text-rendering: optimizeLegibility kills certain Kindle eInk devices */ 95 | /*h1, h2, h3, h4, h5, h6, 96 | body p, li, dd, blockquote > footer, 97 | th, td, figcaption, caption { 98 | text-rendering: optimizeLegibility; 99 | }*/ 100 | /* hack line height of subtitle using floats on Kindle */ 101 | h1.chapter-title .subtitle { 102 | margin-top: -0.2em; 103 | margin-bottom: 0.3em; 104 | /* compensate for reduced line height */ 105 | } 106 | 107 | /* NOTE using b instead of span since Firefox ePubReader applies immutable styles to span */ 108 | h1.chapter-title .subtitle>b { 109 | float: left; 110 | display: inline-block; 111 | margin-bottom: -0.3em; 112 | /* reduce the line height */ 113 | padding-right: 0.2em; 114 | /* spacing between words */ 115 | } 116 | 117 | h1.chapter-title .subtitle>b:last-child { 118 | padding-right: 0; 119 | } 120 | 121 | h1.chapter-title .subtitle::after { 122 | display: table; 123 | content: ' '; 124 | clear: both; 125 | } 126 | } 127 | 128 | /* Use darker font colors on Kindle Paperwhite */ 129 | @media amzn-kf8 and (device-height: 1024px) and (device-width: 758px), 130 | amzn-kf8 and (device-height: 758px) and (device-width: 1024px) { 131 | 132 | body p, 133 | div.abstract>p, 134 | ul, 135 | ol, 136 | li, 137 | dl, 138 | dt, 139 | dd, 140 | footer, 141 | div.verse .attribution, 142 | table.table th, 143 | table.table td, 144 | figcaption, 145 | caption, 146 | h1, 147 | h2, 148 | h3, 149 | h4, 150 | h5 { 151 | color: #000000; 152 | } 153 | 154 | body a:link, 155 | div.abstract>p a:link { 156 | color: #000000; 157 | -webkit-text-fill-color: #000000; 158 | } 159 | 160 | body a:visited { 161 | color: #333332; 162 | -webkit-text-fill-color: #333332; 163 | } 164 | 165 | .chapter-header { 166 | color: #191918; 167 | border-bottom-color: #191918; 168 | } 169 | 170 | h1.chapter-title .subtitle, 171 | .chapter-header p.byline { 172 | color: #000000; 173 | } 174 | } 175 | 176 | .chapter-header p.byline { 177 | height: auto; 178 | /* Aldiko requires this value to be 0; reset it for all others */ 179 | } 180 | 181 | /* Font-based icons */ 182 | .icon { 183 | display: inline-block; 184 | /* !important required to override custom font setting in Kindle (since .icon can appear inside a span) */ 185 | font-family: "FontAwesome" !important; 186 | font-style: normal !important; 187 | font-weight: normal !important; 188 | line-height: 1; 189 | } 190 | 191 | .icon-1_5x { 192 | padding: 0 0.25em; 193 | -webkit-transform: scale(1.5, 1.5); 194 | transform: scale(1.5, 1.5); 195 | } 196 | 197 | .icon-2x { 198 | padding: 0 0.5em; 199 | -webkit-transform: scale(2, 2); 200 | transform: scale(2, 2); 201 | } 202 | 203 | .icon-small { 204 | font-size: 0.85em; 205 | vertical-align: 0.075em; 206 | } 207 | 208 | .icon-1_5em { 209 | font-size: 1.5em; 210 | } 211 | 212 | .icon-2em { 213 | font-size: 2em; 214 | } 215 | 216 | .icon-3em { 217 | font-size: 3em; 218 | } 219 | 220 | .icon-4em { 221 | font-size: 4em; 222 | } 223 | 224 | .icon-rotate-90 { 225 | -webkit-transform: rotate(90deg); 226 | transform: rotate(90deg); 227 | } 228 | 229 | .icon-rotate-90i { 230 | -webkit-transform: scale(-1, 1) rotate(90deg); 231 | transform: scale(-1, 1) rotate(90deg); 232 | } 233 | 234 | .icon-rotate-180 { 235 | -webkit-transform: rotate(180deg); 236 | transform: rotate(180deg); 237 | } 238 | 239 | .icon-rotate-180i { 240 | -webkit-transform: scale(-1, 1) rotate(180deg); 241 | transform: scale(-1, 1) rotate(180deg); 242 | } 243 | 244 | .icon-rotate-270 { 245 | -webkit-transform: rotate(270deg); 246 | transform: rotate(270deg); 247 | } 248 | 249 | .icon-rotate-270i { 250 | -webkit-transform: scale(-1, 1) rotate(270deg); 251 | transform: scale(-1, 1) rotate(270deg); 252 | } 253 | 254 | .icon-flip-h { 255 | -webkit-transform: scale(-1, 1); 256 | transform: scale(-1, 1); 257 | } 258 | 259 | .icon-flip-v { 260 | -webkit-transform: scale(1, -1); 261 | transform: scale(1, -1); 262 | } 263 | -------------------------------------------------------------------------------- /book/theme/fonts/UFL.txt: -------------------------------------------------------------------------------- 1 | ------------------------------- 2 | UBUNTU FONT LICENCE Version 1.0 3 | ------------------------------- 4 | 5 | PREAMBLE 6 | This licence allows the licensed fonts to be used, studied, modified and 7 | redistributed freely. The fonts, including any derivative works, can be 8 | bundled, embedded, and redistributed provided the terms of this licence 9 | are met. The fonts and derivatives, however, cannot be released under 10 | any other licence. The requirement for fonts to remain under this 11 | licence does not require any document created using the fonts or their 12 | derivatives to be published under this licence, as long as the primary 13 | purpose of the document is not to be a vehicle for the distribution of 14 | the fonts. 15 | 16 | DEFINITIONS 17 | "Font Software" refers to the set of files released by the Copyright 18 | Holder(s) under this licence and clearly marked as such. This may 19 | include source files, build scripts and documentation. 20 | 21 | "Original Version" refers to the collection of Font Software components 22 | as received under this licence. 23 | 24 | "Modified Version" refers to any derivative made by adding to, deleting, 25 | or substituting -- in part or in whole -- any of the components of the 26 | Original Version, by changing formats or by porting the Font Software to 27 | a new environment. 28 | 29 | "Copyright Holder(s)" refers to all individuals and companies who have a 30 | copyright ownership of the Font Software. 31 | 32 | "Substantially Changed" refers to Modified Versions which can be easily 33 | identified as dissimilar to the Font Software by users of the Font 34 | Software comparing the Original Version with the Modified Version. 35 | 36 | To "Propagate" a work means to do anything with it that, without 37 | permission, would make you directly or secondarily liable for 38 | infringement under applicable copyright law, except executing it on a 39 | computer or modifying a private copy. Propagation includes copying, 40 | distribution (with or without modification and with or without charging 41 | a redistribution fee), making available to the public, and in some 42 | countries other activities as well. 43 | 44 | PERMISSION & CONDITIONS 45 | This licence does not grant any rights under trademark law and all such 46 | rights are reserved. 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a 49 | copy of the Font Software, to propagate the Font Software, subject to 50 | the below conditions: 51 | 52 | 1) Each copy of the Font Software must contain the above copyright 53 | notice and this licence. These can be included either as stand-alone 54 | text files, human-readable headers or in the appropriate machine- 55 | readable metadata fields within text or binary files as long as those 56 | fields can be easily viewed by the user. 57 | 58 | 2) The font name complies with the following: 59 | (a) The Original Version must retain its name, unmodified. 60 | (b) Modified Versions which are Substantially Changed must be renamed to 61 | avoid use of the name of the Original Version or similar names entirely. 62 | (c) Modified Versions which are not Substantially Changed must be 63 | renamed to both (i) retain the name of the Original Version and (ii) add 64 | additional naming elements to distinguish the Modified Version from the 65 | Original Version. The name of such Modified Versions must be the name of 66 | the Original Version, with "derivative X" where X represents the name of 67 | the new work, appended to that name. 68 | 69 | 3) The name(s) of the Copyright Holder(s) and any contributor to the 70 | Font Software shall not be used to promote, endorse or advertise any 71 | Modified Version, except (i) as required by this licence, (ii) to 72 | acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with 73 | their explicit written permission. 74 | 75 | 4) The Font Software, modified or unmodified, in part or in whole, must 76 | be distributed entirely under this licence, and must not be distributed 77 | under any other licence. The requirement for fonts to remain under this 78 | licence does not affect any document created using the Font Software, 79 | except any version of the Font Software extracted from a document 80 | created using the Font Software may only be distributed under this 81 | licence. 82 | 83 | TERMINATION 84 | This licence becomes null and void if any of the above conditions are 85 | not met. 86 | 87 | DISCLAIMER 88 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 89 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 90 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 91 | COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 92 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 93 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 94 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 95 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER 96 | DEALINGS IN THE FONT SOFTWARE. 97 | -------------------------------------------------------------------------------- /book/theme/fonts/notosans-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/notosans-bold.ttf -------------------------------------------------------------------------------- /book/theme/fonts/notosans-bold_italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/notosans-bold_italic.ttf -------------------------------------------------------------------------------- /book/theme/fonts/notosans-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/notosans-italic.ttf -------------------------------------------------------------------------------- /book/theme/fonts/notosans-normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/notosans-normal.ttf -------------------------------------------------------------------------------- /book/theme/fonts/ubuntumono-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/ubuntumono-bold.ttf -------------------------------------------------------------------------------- /book/theme/fonts/ubuntumono-bold_italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/ubuntumono-bold_italic.ttf -------------------------------------------------------------------------------- /book/theme/fonts/ubuntumono-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/ubuntumono-italic.ttf -------------------------------------------------------------------------------- /book/theme/fonts/ubuntumono-normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/book/theme/fonts/ubuntumono-normal.ttf -------------------------------------------------------------------------------- /book/theme/pdf/bartificer-a5-theme.yml: -------------------------------------------------------------------------------- 1 | extends: default-with-fallback-font 2 | font: 3 | merge: true 4 | catalog: 5 | UbuntuMono: 6 | normal: ubuntumono-normal.ttf 7 | italic: ubuntumono-italic.ttf 8 | bold: ubuntumono-bold.ttf 9 | bold_italic: ubuntumono-bold_italic.ttf 10 | Noto Sans: 11 | normal: notosans-normal.ttf 12 | italic: notosans-italic.ttf 13 | bold: notosans-bold.ttf 14 | bold_italic: notosans-bold_italic.ttf 15 | Noto Serif: 16 | normal: GEM_FONTS_DIR/notoserif-regular-subset.ttf 17 | bold: GEM_FONTS_DIR/notoserif-bold-subset.ttf 18 | italic: GEM_FONTS_DIR/notoserif-italic-subset.ttf 19 | bold_italic: GEM_FONTS_DIR/notoserif-bold_italic-subset.ttf 20 | M+ 1mn: 21 | normal: GEM_FONTS_DIR/mplus1mn-regular-subset.ttf 22 | bold: GEM_FONTS_DIR/mplus1mn-bold-subset.ttf 23 | italic: GEM_FONTS_DIR/mplus1mn-italic-subset.ttf 24 | bold_italic: GEM_FONTS_DIR/mplus1mn-bold_italic-subset.ttf 25 | fallbacks: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 26 | bartificer: 27 | accent-color: #00408d 28 | base-color: #333333 29 | link-color: #002FA7 30 | base-font: Noto Sans 31 | heading-font: UbuntuMono 32 | literal-color: #e83e8c; 33 | page: 34 | layout: portrait 35 | margin: [1.5cm, 1.5cm, 1.5cm, 1.5cm] 36 | # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress 37 | margin_inner: 1.5cm 38 | margin_outer: 1.5cm 39 | size: A5 40 | base: 41 | font-color: $bartificer-base-color 42 | font-family: $bartificer-base-font 43 | heading: 44 | font-color: $bartificer-accent-color 45 | font-family: $bartificer-heading-font 46 | # link: 47 | # font-color: $bartificer-link-color 48 | -------------------------------------------------------------------------------- /book/theme/pdf/bartificer-theme.yml: -------------------------------------------------------------------------------- 1 | extends: default-with-fallback-font 2 | font: 3 | merge: true 4 | catalog: 5 | UbuntuMono: 6 | normal: ubuntumono-normal.ttf 7 | italic: ubuntumono-italic.ttf 8 | bold: ubuntumono-bold.ttf 9 | bold_italic: ubuntumono-bold_italic.ttf 10 | Noto Sans: 11 | normal: notosans-normal.ttf 12 | italic: notosans-italic.ttf 13 | bold: notosans-bold.ttf 14 | bold_italic: notosans-bold_italic.ttf 15 | Noto Serif: 16 | normal: GEM_FONTS_DIR/notoserif-regular-subset.ttf 17 | bold: GEM_FONTS_DIR/notoserif-bold-subset.ttf 18 | italic: GEM_FONTS_DIR/notoserif-italic-subset.ttf 19 | bold_italic: GEM_FONTS_DIR/notoserif-bold_italic-subset.ttf 20 | M+ 1mn: 21 | normal: GEM_FONTS_DIR/mplus1mn-regular-subset.ttf 22 | bold: GEM_FONTS_DIR/mplus1mn-bold-subset.ttf 23 | italic: GEM_FONTS_DIR/mplus1mn-italic-subset.ttf 24 | bold_italic: GEM_FONTS_DIR/mplus1mn-bold_italic-subset.ttf 25 | fallbacks: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 26 | bartificer: 27 | accent-color: #00408d 28 | base-color: #333333 29 | link-color: #002FA7 30 | base-font: Noto Sans 31 | heading-font: UbuntuMono 32 | literal-color: #e83e8c; 33 | page: 34 | layout: portrait 35 | margin: [2cm, 2cm, 2cm, 2cm] 36 | # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress 37 | margin_inner: 2.0cm 38 | margin_outer: 1.5cm 39 | size: A4 40 | base: 41 | font-color: $bartificer-base-color 42 | font-family: $bartificer-base-font 43 | heading: 44 | font-color: $bartificer-accent-color 45 | font-family: $bartificer-heading-font 46 | # link: 47 | # font-color: $bartificer-link-color 48 | -------------------------------------------------------------------------------- /book/theme/pdf/bartificer-us-theme.yml: -------------------------------------------------------------------------------- 1 | extends: bartificer 2 | page: 3 | layout: portrait 4 | margin: [1in, 1in, 1in, 1in] 5 | # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress 6 | margin_inner: 1in 7 | margin_outer: 0.75in 8 | size: letter 9 | -------------------------------------------------------------------------------- /book/ttt-afterword.adoc: -------------------------------------------------------------------------------- 1 | [[afterword]] 2 | = Afterword 3 | 4 | The creation of Taming the Terminal was executed using open source tools on an open source platform and with version control through the open source git technology. Allison Sheridan interviewed Dr. Helma van der Linden on how she created the book in an episode of the Chit Chat Across the Pond podcast. Helma walks through how each tool played its part, and how she developed the process. It's a great story of ingenuity on Helma's part and an amazing story of how open source allows us to build great things. You can find the audio and notes with links to the tools at https://www.podfeet.com/blog/2020/08/ccatp-649/ 5 | -------------------------------------------------------------------------------- /book/ttt-contents.adoc: -------------------------------------------------------------------------------- 1 | ifndef::backend-html[:leveloffset: +1] 2 | 3 | include::ttt-foreword.adoc[] 4 | 5 | include::ttt-preface.adoc[] 6 | 7 | include::ttt-introduction.adoc[] 8 | 9 | include::ttt01.adoc[] 10 | 11 | include::ttt02.adoc[] 12 | 13 | include::ttt03.adoc[] 14 | 15 | include::ttt04.adoc[] 16 | 17 | include::ttt05.adoc[] 18 | 19 | include::ttt06.adoc[] 20 | 21 | include::ttt07.adoc[] 22 | 23 | include::ttt08.adoc[] 24 | 25 | include::ttt09.adoc[] 26 | 27 | include::ttt10.adoc[] 28 | 29 | include::ttt11.adoc[] 30 | 31 | include::ttt12.adoc[] 32 | 33 | include::ttt13.adoc[] 34 | 35 | include::ttt14.adoc[] 36 | 37 | include::ttt15.adoc[] 38 | 39 | include::ttt16.adoc[] 40 | 41 | include::ttt17.adoc[] 42 | 43 | include::ttt18.adoc[] 44 | 45 | include::ttt19.adoc[] 46 | 47 | include::ttt20.adoc[] 48 | 49 | include::ttt21.adoc[] 50 | 51 | include::ttt22.adoc[] 52 | 53 | include::ttt23.adoc[] 54 | 55 | include::ttt24.adoc[] 56 | 57 | include::ttt25.adoc[] 58 | 59 | include::ttt26.adoc[] 60 | 61 | include::ttt27.adoc[] 62 | 63 | include::ttt28.adoc[] 64 | 65 | include::ttt29.adoc[] 66 | 67 | include::ttt30.adoc[] 68 | 69 | include::ttt31.adoc[] 70 | 71 | include::ttt32.adoc[] 72 | 73 | include::ttt33.adoc[] 74 | 75 | include::ttt34.adoc[] 76 | 77 | include::ttt35.adoc[] 78 | 79 | include::ttt36.adoc[] 80 | 81 | include::ttt37.adoc[] 82 | 83 | include::ttt38.adoc[] 84 | 85 | include::ttt39.adoc[] 86 | 87 | include::ttt40.adoc[] 88 | 89 | include::ttt-afterword.adoc[] 90 | 91 | ifdef::troubleshoot[include::ttt-troubleshooting.adoc[]] 92 | 93 | // ifndef::backend-html[:leveloffset: 0] 94 | 95 | // ifndef::backend-html[include::index.asc[]] 96 | 97 | include::colophon.adoc[] 98 | -------------------------------------------------------------------------------- /book/ttt-foreword.adoc: -------------------------------------------------------------------------------- 1 | [[foreword]] 2 | = Foreword 3 | include::variables.adoc[] 4 | 5 | As an IT-person and Apple geek I started listening to the NosillaCast podcast by Allison Sheridan somewhere in the early '10s. It's a podcast with a wide variety of tech topics with a _slight_ Apple bias. Topics range from an interview of a blind person using an iPhone to an article on the security measures of a certain bank's webapp to tutorials on how to fix a tech problem with one of your devices. 6 | I especially enjoyed the sections where Bart was explaining some technical topic. The podcasts kept me company on my long commute to and from work. 7 | 8 | Somewhere in 2013 Bart announced he was starting a series of tutorials on the Terminal and all kinds of commands to teach Allison. Cool, let's see how much I already know. The first sessions were easy. I knew most of what Bart was explaining, and yes, I was one of those persons yelling in the car when Bart quizzed Allison. 9 | 10 | Soon I heard new things and quickly it became a game. What would Bart explain this time and would I know it or would it be new. I started to look forward to the commute time because that's the time I would listen to the podcast. I even felt sad when Bart explained that episode 35 was the last one of the series. Luckily time proved him wrong and now the episodes kept coming. 11 | 12 | When people at work expressed fear of Terminal commands, I would point them to the series on Bart's website, allowing my co-workers to read his tutorials and listen to the podcast audio. I even added the most relevant episodes to the training we had for our new junior developers. 13 | 14 | In 2016 I went to Dublin for a holiday and actually met Bart in real life. Turns out he's a great guy and a kindred spirit. It's his passion to teach people about the stuff he loves that makes him so valuable to the community. He combines that with academic precision to present well-researched information in bite-sized chunks that makes it easy to follow along, no matter what your skill level is. 15 | 16 | I hope you get as much fun and knowledge out of this series as I did, now in an eBook. 17 | 18 | Helma van der Linden + 19 | _TTT fan_ 20 | -------------------------------------------------------------------------------- /book/ttt-introduction.adoc: -------------------------------------------------------------------------------- 1 | [[introduction]] 2 | = Introduction 3 | include::variables.adoc[] 4 | 5 | Taming the Terminal is specifically targeted at learning the macOS Terminal but most of the content is applicable to the Linux command line. If you're on Windows, it is recommended that you use the Linux Subsystem for Windows to learn along with this book. Wherever practical, Bart explains the differences that you may encounter if you're not on macOS. 6 | 7 | The series started in April 2013 and was essentially complete in 2015 after 35 of n lessons, but Bart carefully labeled them as "of n" because he knew that over time there likely would be new episodes. More episodes have indeed come out, and this book will be updated over time as the new instalments are released. 8 | 9 | == Zsh vs Bash 10 | In macOS Catalina, released after much of the tutorial content in this book was released, Apple replaced the default shell bash with the zsh shell. As a result you'll notice the prompt change from `$` to `%` partway through the book. There may be cases where the instructions given during the bash days might not work with today's zsh. 11 | 12 | To switch back to bash if you do run into problems, simply enter: 13 | 14 | [source,shell] 15 | ---- 16 | bash --login 17 | ---- 18 | 19 | You'll be shown this warning explaining how to switch your default interactive shell back to zsh, and can proceed with the lessons. 20 | 21 | [source,shell] 22 | ---- 23 | The default interactive shell is now zsh. 24 | To update your account to use zsh, please run `chsh -s /bin/zsh`. 25 | For more details, please visit https://support.apple.com/kb/HT208050. 26 | ---- 27 | 28 | If you'd like to see these instalments in their web form, you can go to https://ttt.bartificer.net[ttt.bartificer.net]. 29 | 30 | If you enjoy the format of this series, you might also enjoy the podcast and written tutorials for Bart and Allison's next series, Programming By Stealth at https://pbs.bartificer.net[pbs.bartificer.net]. 31 | 32 | Feedback on the book can be sent to allison@podfeet.com. 33 | 34 | We hope you enjoy your journey with Taming the Terminal. 35 | 36 | == Full Disk Access 37 | Starting with macOS 10.14 Mojave, Apple added privacy controls that prevent apps from accessing your entire disk without explicit permission. This series assumes the Terminal app has been granted either _Files and Folders_ or _Full Disk Access_ permission under _Privacy & Security_ in the macOS settings. -------------------------------------------------------------------------------- /book/ttt-preface.adoc: -------------------------------------------------------------------------------- 1 | [[preface]] 2 | = Preface 3 | 4 | Taming the Terminal was created as a podcast and written tutorial with Bart Busschots as the instructor and Allison Sheridan as the student. Taming the Terminal started its life as part of the https://www.podfeet.com[NosillaCast Apple Podcast] and was eventually spun off as a standalone Podcast. Bart and Allison have been podcasting together for many years, and their friendship and camaraderie make the recordings a delightful way to learn these technical concepts. To our American readers, note that the text is written in British English so some words such as "instalment" may appear misspelled, but they are not. 5 | 6 | The book version of the podcast was a labor of love by Allison Sheridan and Helma van der Linden as a surprise gift to Bart Busschots for all he has done for the community. 7 | 8 | If you enjoy Taming the Terminal, you may also enjoy Bart and Allison's second podcast entitled Programming By Stealth. This is a fortnightly podcast where Bart is teaching the audience to program, starting with HTML and CSS (that's the stealthy part since it's not proper programming), into JavaScript and beyond. As with Taming the Terminal, Bart creates fantastic written tutorials for Programming By Stealth, including challenges to cement the listener's skills. 9 | 10 | You can find Programming By Stealth and Taming the Terminal podcasts along with Allison's other shows at https://www.podfeet.com/blog/subscribe-to-the-podcasts/[podfeet.com/blog/subscribe-to-the-podcasts/]. 11 | 12 | [[contributors]] 13 | == Contributors to Taming the Terminal 14 | 15 | Bart Busschots is the author of all of the written tutorials in the Taming the Terminal series so the lion's share of the credit goes to him. Allison Sheridan is the student of the series asking the dumb questions, and she created the podcast. Steve Sheridan convinced Bart and Allison that instead of having the series buried inside the larger NosillaCast Podcast, that it should be a standalone podcast. He did all of the editing to pull out the audio for the 35 original episodes from the NosillaCast, top and tail with music, and pushed Bart and Allison to record the intros. Steve even created the Taming the Terminal logo. 16 | 17 | Allison had a vision of Taming the Terminal becoming an eBook but had no idea how to accomplish this. Helma van der Linden figured out how to programmatically turn the original feature-rich set of HTML web pages into an ePub book as well as producing a PDF version, and even an HTML version. She managed the GitHub project and fixed the technical aspects of the book and kept Allison on task as she did the proofreading and editing of the entire book. Allison created the book cover as well. 18 | 19 | ifdef::troubleshoot[] 20 | == Problems with the ePub 21 | 22 | In the course of putting this ebook together we noticed that you might run into some issues with the ePub in Apple's Books reader. The instructions on how to solve them are in the <> chapter of this book. 23 | 24 | endif::[] 25 | -------------------------------------------------------------------------------- /book/ttt-spine.adoc: -------------------------------------------------------------------------------- 1 | = Taming the Terminal: The Technical Manual and Podcast to Master the macOS Command Line 2 | Bart Busschots 3 | :doctype: book 4 | :docinfo: shared 5 | :doctitle: Taming the Terminal 6 | :lang: en-GB 7 | :creator: {author} 8 | :producer: Allison Sheridan and Helma van der Linden 9 | :cover-artist: Allison Sheridan 10 | :copyright: CC-BY-NC-ND 4.0 11 | :imagesdir: assets 12 | :front-cover-image: image:cover.png[Front Cover,1400,1873] 13 | :pagenums: 14 | :icons: font 15 | :source-highlighter: rouge 16 | // ifndef::backend-epub3[:source-highlighter: rouge] 17 | // ifdef::backend-epub3[:source-highligter: pygments] 18 | :rouge-linenums-mode: inline 19 | :rouge-css: inline 20 | :rouge-style: github 21 | :pygments-linenums-mode: inline 22 | :pygments-style: manni 23 | :pygments-css: inline 24 | :table-stripes: even 25 | :toc: left 26 | ifndef::backend-pdf[:toclevels: 0] 27 | ifdef::backend-pdf[:toclevels: 1] 28 | :experimental: 29 | // Define unicode for Apple Command key. 30 | :commandkey: ⌘ 31 | 32 | :update-url: https://github.com/bartificer/taming-the-terminal/releases 33 | 34 | include::ttt-contents.adoc[] 35 | -------------------------------------------------------------------------------- /book/ttt-troubleshooting.adoc: -------------------------------------------------------------------------------- 1 | [[troubleshooting]] 2 | = ePub Troubleshooting tips 3 | 4 | If you open this ePub in Apple Books, you might encounter these problems. 5 | Here are instructions on how to solve them. 6 | 7 | == Audio files in Apple Books 8 | 9 | If you open the ePub version of this book in Books on an iPad or iPhone you might run into the problem that the episodes cannot be played. When you press the play button it takes some time and then shows the word 'Error'. 10 | 11 | You can solve this problem by following these actions: 12 | 13 | * Go to the iOS/iPadOS home screen 14 | * Open menu:Settings[Books] 15 | * Toggle 'Online Content' to *off* 16 | * In Books, go back to the library 17 | * Remove the downloaded book, just the download, no need to remove the book from iCloud 18 | * Switch back to Settings 19 | * Toggle the 'Online Content' to *on* 20 | * Open Books 21 | * Select the Taming the Terminal Book in your library to redownload 22 | * You should now get a message to confirm that you want *allow Apple Books to access the publisher's online content for this book?* 23 | * Select Allow 24 | 25 | The audio files should now play and not give an error. 26 | In some cases it make take some time for the audio files to be available. 27 | 28 | == No cover in Apple Books 29 | 30 | If your ebook has no cover image in Apple Books on your iPad or iPhone, just the standard generated coloured background with only the title and the author's name in white, then you've probably added the ebook to Apple Books on your Mac and you're suffering from a long standing bug in Apple Books. 31 | 32 | You can solve this problem by following these actions. 33 | 34 | * Remove the ebook from the library. Select *Delete everywhere* 35 | * Airdrop the ebook from your Mac to your iPad 36 | * or add the ebook to a folder that you can sync with your iPad outside of Books. This can be a folder in iCloud Drive or Dropbox or any cloudbased storage that is linked to both your computer and your iPad. 37 | * On the iPad you will get a message that asks you to select the application you want to open the Taming the Terminal Book in. 38 | * Select *Books* 39 | * You will now see the ebook with its cover in the library 40 | * You can now delete the file from your cloudbased storage as syncing will be taken care of by Books. 41 | 42 | This also works on the iPhone. 43 | -------------------------------------------------------------------------------- /book/ttt05.adoc: -------------------------------------------------------------------------------- 1 | [[ttt05]] 2 | = TTT Part 5 of n {longdash} File Permissions 3 | include::variables.adoc[] 4 | 5 | In this instalment, it's time to make a start on one of the most important Unix/Linux concepts, file permissions. 6 | This can get quite confusing, but it's impossible to overstate the importance of understanding how to read and set permissions on files and folders. 7 | To keep things manageable, I'm splitting understanding and altering permissions into two separate instalments. 8 | 9 | Linux and Unix (and hence OS X) all share a common file permissions system, but while they share the same common core, they do each add their own more advanced permissions systems on top of that common core. 10 | In this first instalment, we're only going to look at the common core, so everything in this instalment applies equally to Linux, Unix, and OS X. 11 | In future instalments, we'll take a brief look at the extra file information and permissions OS X associates with files, but we won't be looking at the Linux side of things, where more granular permissions are provided through kernel extensions like SELinux. 12 | 13 | .Matching Podcast Episode 5 14 | **** 15 | 16 | Listen Along: Taming the Terminal Podcast Episode 5 17 | 18 | // no audiocontrols in pdf 19 | ifndef::backend-pdf,apple-books[] 20 | 21 | audio::{url-mp3}/TTT05FilePermissions/TTT_05_File_Permissions.mp3[] 22 | endif::[] 23 | 24 | Scan the QRcode to listen on a different device 25 | 26 | image::qrcodes/TTT_05.png[QRcode, align='left'] 27 | 28 | You can also {url-mp3}/TTT05FilePermissions/TTT_05_File_Permissions.mp3[play/download the MP3 in your browser] 29 | **** 30 | 31 | == Files and permissions 32 | 33 | Let's start with some context. 34 | Just like every command shell has a present working directory, every process on a Linux/Unix system is also owned by a user, including shell processes. 35 | So, when you execute a command in a command shell, that process has a file system location associated with it and a username. 36 | By default your shell will be running as the user you logged into your computer as, though you can become a different user if and when you need to (more on that in future instalments). 37 | You can see which user you are running as with the very intuitive command: 38 | 39 | [source,shell] 40 | ---- 41 | whoami 42 | ---- 43 | 44 | Secondly, users on Unix/Linux systems can be members of one or more groups. 45 | On OS X there are a number of system groups to which your user account may belong, including one called `staff` to which all admin users belong. 46 | You can see what groups you belong to with the command: 47 | 48 | [source,shell] 49 | ---- 50 | groups 51 | ---- 52 | 53 | (You can even see the groups any username belongs to by adding the username as an argument.) 54 | 55 | On older versions of OS X creating your own custom groups was hard. 56 | Thankfully Apple has addressed this shortcoming in more recent versions of the OS, and you can now create and manage your own custom groups in the `Users & Groups` preference pane (click the `+` button and choose `group` as the user type, then use the radio buttons to add or remove people from the group). 57 | 58 | Unix/Linux file systems like EXT and HFS+ store metadata about each file and folder as part of that file or folder's entry in the file system. 59 | Some of that metadata is purely informational, things like the date the file was created, and the date it was last modified, but that metadata also includes ownership information and a so-called _Unix File Permission Mask_. 60 | 61 | There are two pieces of ownership information stored about every file and folder: a UID, and a GID. 62 | What this means is that every file and folder belongs to one user and one group. 63 | 64 | In the standard Linux/Unix file permissions model there are only three permissions that can be granted on a file or folder: 65 | 66 | * *Read (`r`):* if set on a file it means the contents of the file can be read. 67 | If set on a folder it means the contents of the files and folders contained within the folder can be read, assuming the permissions masks further down the filesystem tree also allow that. 68 | If you are trying to access a file, and read permission is blocked at even one point along the absolute path to the file, access will be denied. 69 | * *Write (`w`):* if set on a file it means the contents can be altered, or the file deleted. 70 | If set on a folder it means new files or folders can be created within the folder. 71 | * *Execute (`x`):* if set on a file it means the file can be run. 72 | The OS will refuse to run any file, be it a script or a binary executable, if the user does not have execute permission. 73 | When set on a folder, execute permission controls whether or not the user has the right to list the contents of a directory. 74 | 75 | All permutations of these three permissions are possible on any file, even if some of them are counter-intuitive and rarely needed. 76 | 77 | The Unix file Permission Mask ties all these concepts together. 78 | The combination of the context of the executing process and the metadata in a file or folder determines the permissions that apply. 79 | You can use the `ls -l` command to see the ownership information and file permission mask associated with any file or folder. 80 | 81 | The hard part is interpreting the meaning of the file permission mask. 82 | 83 | On standard Unix/Linux systems, this mask contains ten characters, though on OS X it can contain an optional 11th or even 12th character appended to the end of the mask (we'll be ignoring these for this instalment). 84 | 85 | The first character specifies the '`type`' of the file: 86 | 87 | * `-` signifies a regular file 88 | * `d` signifies a directory (i.e. a folder) 89 | * `l` signifies a symbolic link (more on these in a later instalment) 90 | * `b` `c` `p` and `s` are also valid file types, but they are used to represent things like block devices and sockets rather than '`normal`' files, and we'll be ignoring them in this series. 91 | 92 | The remaining nine characters represent three sets of read, write, and execute permissions (`rwx`), specified in that order. 93 | If a permission is present then it is represented by an `r`, `w`, or `x`, and if it's not present, it's represented by a `-`. 94 | 95 | The first group of three permission characters are the permissions granted to the user who owns the file, the second three are the permissions granted to all users who are members of the group that owns the file, and the last three are the permissions granted to everyone, regardless of username or group membership. 96 | 97 | To figure out what permissions you have on a file you need to know the following things: 98 | 99 | . your username 100 | . what groups you belong to 101 | . what user the file or folder belongs to 102 | . what group the file or folder belongs to 103 | . the file or folder's permission mask 104 | 105 | When you try to read the contents of a file, your OS will figure out whether or not to grant you that access using the following algorithm: 106 | 107 | . is the user trying to read the file the owner of the file? 108 | If so, check if the owner is granted read permission, if yes, allow to read, if no, continue. 109 | . is the user trying to read the file a member of the group that owns the file? 110 | If so, check if the group is granted read permission, if yes, allow read, if no, continue. 111 | . check the global read permission, and allow or deny access as specified. 112 | 113 | Write and execute permissions are processed in exactly the same way. 114 | 115 | When you see the output of `ls -l`, you need to mentally follow the same algorithm to figure out whether or not you have a given permission on a given file or folder. 116 | The three columns to look at are the mask, the file owner, and the file group. 117 | 118 | We'll stop here for now. 119 | In the next instalment, we will explain the meaning of the `+` and `@` characters which can show up at the end of a file permission masks on OS X, and we'll look at the commands for altering the permissions on a file or folder. 120 | -------------------------------------------------------------------------------- /book/ttt07.adoc: -------------------------------------------------------------------------------- 1 | [[ttt07]] 2 | = TTT Part 7 of n {longdash} Managing Files 3 | include::variables.adoc[] 4 | 5 | So far in this series we've focused mostly on the file system, looking at the details of file systems, how to navigate them, and at file permissions and metadata. 6 | We're almost ready to move on and start looking at how processes work in Unix/Linux/OS X, but we have a few more file-related commands to look at before we do. 7 | 8 | In this instalment, we'll be looking at how to manipulate the file system. In other words, how to create files and folders, how to copy them, how to move them, how to rename them, and finally how to delete them. 9 | 10 | .Matching Podcast Episode 7 11 | **** 12 | 13 | Listen Along: Taming the Terminal Podcast Episode 7 14 | 15 | // no audiocontrols in pdf 16 | ifndef::backend-pdf,apple-books[] 17 | 18 | audio::{url-mp3}/TTT07ManagingFiles/TTT_07_Managing_Files.mp3[] 19 | endif::[] 20 | 21 | Scan the QRcode to listen on a different device 22 | 23 | image::qrcodes/TTT_07.png[QRcode, align='left'] 24 | 25 | You can also {url-mp3}/TTT07ManagingFiles/TTT_07_Managing_Files.mp3[play/download the MP3 in your browser] 26 | 27 | **** 28 | 29 | == Creating Folders & Files 30 | 31 | This is one of those topics that I think is best taught through example, so let's start by opening a Terminal window and navigating to our Documents folder: 32 | 33 | [source,shell] 34 | ---- 35 | cd ~/Documents 36 | ---- 37 | 38 | We'll then create a folder called `TtT6n` in our `Documents` folder with the command: 39 | 40 | [source,shell] 41 | ---- 42 | mkdir TtT6n 43 | ---- 44 | 45 | As you can see, directories/folders are created using the `mkdir` (make directory) command. 46 | When used normally the command can only create folders within existing folders. 47 | A handy flag to know is the `-p` (for _path_) flag which will instruct `mkdir` to create all parts of a path that do not yet exist in one go, e.g.: 48 | 49 | [source,shell] 50 | ---- 51 | mkdir -p TtT6n/topLevelFolder/secondLevelFolder 52 | ---- 53 | 54 | Since the `TtT6n` folder already existed the command will have no effect on it, however, within that folder it will first create a folder called `topLevelFolder`, and then within that folder, it will create a folder called `secondLevelFolder`. 55 | 56 | At this stage let's move into the TtT6n folder from where we'll execute the remainder of our examples: 57 | 58 | [source,shell] 59 | ---- 60 | cd TtT6n 61 | ---- 62 | 63 | We can now use the `-R` (for recursive) flag for `ls` to verify that the `mkdir -p` command did what we expect it to. I like to use the `-F` flag we met before with `-R` so that folder names have a trailing `/` appended: 64 | 65 | [source,shell] 66 | ---- 67 | ls -RF 68 | ---- 69 | 70 | When using `ls -R` the contents of each folder is separated by a blank line, and for folders deeper down than the current folder each listing is prefixed with the relative path to the folder about to be listed followed by a `:`. 71 | 72 | In other words, we are expecting to see just a single entry in the first segment, a folder called `topLevelFolder`, then we expect to see a blank line followed by the name of the next folder to be listed, which will be the aforementioned `topLevelFolder`, followed by the listing of its contents, which is also just one folder, this time called `secondLevelFolder`. 73 | This will then be followed by a header and listing of the contents of `secondLevelFolder`, which is currently empty. 74 | 75 | Let's now create two empty files in the deepest folder within our test folder (`secondLevelFolder`). 76 | There are many ways to create a file in Unix/Linux, but one of the simplest is to use the `touch` command. The main purpose of this command is to change the last edited date of an existing file to the current time, but if you try to `touch` a file that doesn't exist, `touch` creates it for you: 77 | 78 | [source,shell] 79 | ---- 80 | touch topLevelFolder/secondLevelFolder/file1.txt topLevelFolder/secondLevelFolder/file2.txt 81 | ---- 82 | 83 | You can use `ls -RF` to verify that these files have indeed been created (you can use the `-lh` flags along with the `-RF` flags to see that the files are indeed empty -- i.e. 84 | 0 bytes in size). 85 | 86 | [source,shell] 87 | ---- 88 | ls -RFlh 89 | ---- 90 | 91 | == Copying Files/Folders 92 | 93 | Let's now create a second top-level folder, and copy the files to it: 94 | 95 | [source,shell] 96 | ---- 97 | mkdir topLevelFolder2 98 | cp topLevelFolder/secondLevelFolder/file1.txt topLevelFolder2 99 | cp topLevelFolder/secondLevelFolder/file2.txt topLevelFolder2 100 | ---- 101 | 102 | As you can see, the command to copy a file is `cp`. 103 | Here we have used `cp` in its simplest form, with just two arguments, the first being what to copy, the second being where to copy it to. 104 | The first argument must be a file and the last a folder. 105 | 106 | The `cp` command is a cleverer than this though -- it can take any number of arguments greater than two. All arguments but the last one will be treated as sources, and the last one will be treated as the destination to copy all these sources to. 107 | So, we can re-write our two `cp` commands above as simply: 108 | 109 | [source,shell] 110 | ---- 111 | cp topLevelFolder/secondLevelFolder/file1.txt topLevelFolder/secondLevelFolder/file2.txt topLevelFolder2 112 | ---- 113 | 114 | (You can verify that the copy has worked with the `ls -RF` command.) 115 | 116 | We can be even more efficient though -- we can use the shell's wild card completion functionality to simplify things even further: 117 | 118 | [source,shell] 119 | ---- 120 | cp topLevelFolder/secondLevelFolder/*.txt topLevelFolder2 121 | ---- 122 | 123 | Note that the `cp` command will happily work with either full or relative paths. 124 | Also, you may remember that a few instalments back I mentioned that every folder contains a file called `.` that's a reference to the folder containing it, and that while this sounds useless, it's actually very useful. 125 | Well, the `cp` command provides a great example to illustrate this point. 126 | To copy a file to the folder you are currently in, you can use `.` as the destination path. 127 | 128 | By default, `cp` will only copy files, but, it can copy folders (and their contents) if you use the `-R` (recursive) flag. 129 | The flag should precede the argument list. 130 | 131 | Let's now create yet another empty folder and copy the folder `secondLevelFolder`, and all its contents, into the new folder: 132 | 133 | [source,shell] 134 | ---- 135 | mkdir topLevelFolder3 136 | cp -R topLevelFolder/secondLevelFolder topLevelFolder3 137 | ---- 138 | 139 | (Again, you can use `ls -RF` to verify that the copy has worked as expected.) 140 | 141 | == Moving Files/Folders 142 | 143 | The `mv` (move) command works in a similar way to `cp`, but, it removes the source files and folders after it has copied them to the destination folder. 144 | The `mv` command can move folders without needing to specify any flags. 145 | As an example, let's create yet another folder, and move our original `secondLevelFolder` and its contents to it: 146 | 147 | [source,shell] 148 | ---- 149 | mkdir topLevelFolder4 150 | mv topLevelFolder/secondLevelFolder topLevelFolder4 151 | ---- 152 | 153 | (Again, we can use `ls -RF` to verify that the folder and the files within it have indeed been moved.) 154 | 155 | Users of DOS may remember that in DOS the commands to copy and move were simply `copy` and `move`, and, that there was a separate command to rename a file or folder which was simply `rename`. 156 | Unix/Linux does not have a separate rename command, instead, you rename a file or folder by moving it from its old name to its new name. 157 | As an example, let's rename our first folder (`topLevelFolder`) to `topLevelFolder0`: 158 | 159 | [source,shell] 160 | ---- 161 | mv topLevelFolder topLevelFolder0 162 | ---- 163 | 164 | We can use a simple `ls` command to verify that the folder has indeed been renamed. 165 | 166 | == Deleting Files & folders 167 | 168 | Finally, I want to briefly mention the `rm` (remove) command, which can be used to delete files and/or folders. 169 | The `rm` command simply takes the list of files to be nuked as arguments. 170 | Unlike deleting files in the Finder, the `rm` command doesn't have any kind of safety net -- it does not use the recycle bin. If you mess it up, you'd better hope you have a recent backup because your files are GONE! 171 | This is why I advise people to avoid using deleting files/folders from the command line unless you absolutely have to, or, are very comfortable on the Terminal. 172 | It's much safer to delete things in the Finder. 173 | Whenever you do use the `rm` command, ALWAYS check over your command before hitting enter! 174 | To adapt the older carpentry adage that you should _always measure twice and cut once_, my advice when using `rm` is to _think twice and execute once_. 175 | 176 | By default, the `rm` command will only allow you to delete regular files, but if you add the `-r` flag it will delete folders and their contents too. 177 | A great additional safety net when using `rm` either in recursive mode or with shell wild card completion is the use the `-i` flag to enter interactive mode -- in this mode, you will be asked to confirm the deletion of each file and folder. 178 | 179 | Let's end by going back up one level, and then deleting our digital playpen recursively: 180 | 181 | [source,shell] 182 | ---- 183 | cd .. 184 | rm -ri TtT6n 185 | ---- 186 | 187 | == Conclusion 188 | 189 | Today we learned how to create files and folders with `touch` and `mkdir`, to copy files with `cp`, move and rename them with `mv`, and delete them with `rm`. 190 | Next time we'll move on to looking at how Unix/Linux/OS X handled processes. 191 | -------------------------------------------------------------------------------- /book/ttt10.adoc: -------------------------------------------------------------------------------- 1 | [[ttt10]] 2 | = TTT Part 10 of n {longdash} man 3 | include::variables.adoc[] 4 | 5 | 6 | Like with so many things in tech, it doesn't matter if you don't know everything. What matters is that you have the skills to quickly find the information you need when you need it. 7 | Programmers don't memorise entire APIs, they simply learn how to search them, and how to interpret the results of their searches. 8 | 9 | This is an area where the Linux/Unix command-line environment really shines. 10 | All Linux & Unix distributions, including OS X, have a built-in manual that allows you to quickly find the documentation you need, when you need it. 11 | Every command-line command/program can add its documentation to the system manual. 12 | In fact, each command/program can actually add multiple documents to the manual. 13 | Tools that make use of configuration files will often add a separate document to describe the structure of the configuration file for example. 14 | 15 | Every built-in command will have an entry in the manual, and any software you install via the standard package management tools for your distribution will almost certainly bundle the related manual entries as part of the package. 16 | This is also true on OS X, where package mangers like https://www.macports.org[Mac Ports] will also bundle manual pages with the software they install, and even stand-alone `.pkg` installers for command-line tools will usually also install manual entries. 17 | If you run it from the command line, the chances are very high that there will be a manual entry for it on Linux, Unix and OS X. 18 | 19 | .Matching Podcast Episode 10 20 | **** 21 | 22 | Listen Along: Taming the Terminal Podcast Episode 10 23 | 24 | // no audiocontrols in pdf 25 | ifndef::backend-pdf,apple-books[] 26 | 27 | audio::{url-mp3}/TTT10Man/TTT_10_man.mp3[] 28 | endif::[] 29 | 30 | Scan the QRcode to listen on a different device 31 | 32 | image::qrcodes/TTT_10.png[QRcode, align='left'] 33 | 34 | You can also {url-mp3}/TTT10Man/TTT_10_man.mp3[play/download the MP3 in your browser] 35 | **** 36 | 37 | I'm getting tired of typing '`manual entry`', so let's introduce a little jargon. 38 | The command to read a manual entry is `man`, so command-line aficionados will almost always refer to manual entries simply as _man pages_. I'm going to do the same from here on. 39 | 40 | In theory, the authors of man pages are free to write in any style they wish and to organise their pages into any structure they see fit. 41 | Thankfully, a very strong convention has established itself, so just about every man page in existence is written in the same style and organised in approximately the same way. 42 | Initially, you'll find the style odd, and perhaps even off-putting, but you'll soon get used to it. 43 | Sadly there is no shortcut -- the only way to get good at reading man pages, is to read man pages! 44 | 45 | == Navigation 46 | 47 | Let's start with the practicalities of opening, closing, and navigating a man page before we look at the structure and formatting. 48 | 49 | To open a man page simply use the `man` command with a single argument, the name of the command or config file you would like to read the entry for. 50 | 51 | As an example, let's call up the documentation for the `ls` command: 52 | 53 | [source,shell] 54 | ---- 55 | man ls 56 | ---- 57 | 58 | You'll immediately notice that you've lost your command prompt, and are viewing a text document in your terminal window. 59 | The most important thing to learn is how to exit out of the man page and get back to your command prompt. 60 | To get out, simply hit the kbd:[q] key (for quit)! 61 | 62 | OK, now that we know to get back out, let's re-open the man page for `ls` and have a look around. 63 | 64 | You can navigate up and down in a man page with the up and down arrow keys. 65 | You can also scroll down a single line by hitting enter, or a whole page at once with the spacebar. 66 | To scroll up a whole page at once hit kbd:[b] (for back). 67 | You can also go back half a page with the kbd:[u] key (for up). 68 | 69 | You can search in a document by typing `/` followed by your search pattern, and then hitting enter. 70 | To get to the next result hit the kbd:[n] key (and to get to the previous result, kbd:[Shift+n]). 71 | 72 | == Structure 73 | 74 | Now that we can navigate around, let's have a closer look at the structure of a man page. 75 | The first thing to note is that each man page is divided into sections, which are labelled in all capitals, and their content is indented by one tab. 76 | Sections can contain sub-sections who's content is indented by two tabs, and so on. 77 | 78 | Just about every man page you'll ever see will have the following three sections: 79 | 80 | *NAME* -- this will be the first section, and will simply contain the name of the thing the man page is documenting, perhaps with a very short description. 81 | E.g. 82 | the name section in the `ls` man page contains `+++ls -- list directory contents+++`. 83 | 84 | *SYNOPSIS* -- this is a very important section and one we'll look at in a lot more detail below. 85 | This section uses a somewhat cryptic notation to describe the structure of the arguments a command expects. 86 | 87 | *DESCRIPTION* -- this is where the main body of the documentation will be contained. 88 | The description is usually the longest section by far, and often contains sub-sections. 89 | This is where you expect to find a list of all the options a command accepts and a description of what they do. 90 | 91 | Just to reiterate, there is no formal structure every man page has to follow, but there are conventions, so most man pages will contain at least some of the sections listed below, in addition to the three above. 92 | A man page may contain custom sections though, so the list below is not exhaustive. 93 | 94 | *OVERVIEW* -- very long man pages sometimes contain a one-paragraph summary of what the command does between the SYNOPSIS and DESCRIPTION sections. 95 | 96 | *OPTIONS* -- more complicated commands may separate their list of command-line flags into a separate OPTIONS section immediately after the DESCRIPTION section. 97 | 98 | *EXAMPLES* -- many man pages contain annotated examples of how the command being documented can be used. 99 | If present, this is usually a very helpful section, and often worth jumping straight to. 100 | 101 | *TIPS* -- some man pages use this section to offer some useful advice to users. 102 | 103 | *SEE ALSO* -- this section is used to list related man pages, often describing related commands or associated configuration files. 104 | 105 | *FILES* -- if a command's function is affected by one or more configuration files, the default file system locations for these files are often listed in this section. 106 | E.g. 107 | the FILES section from the `ntpdate` man page: 108 | 109 | [source,shell] 110 | ---- 111 | FILES 112 | /etc/ntp.keys contains the encryption keys used by ntpdate. 113 | ---- 114 | 115 | *STANDARDS* -- if the command conforms to some kind of standard set out by some sort of standards authority (perhaps the IEEE or the ISO), then the relevant standards may be listed in this section. 116 | E.g. 117 | the STANDARDS section from the `ls` man page: 118 | 119 | [source,shell] 120 | ---- 121 | STANDARDS 122 | The ls utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). 123 | ---- 124 | 125 | *DIAGNOSTICS* -- for now, you can probably ignore this section. 126 | If it's present it contains information that's usually only useful when writing or debugging scripts. 127 | 128 | *ENVIRONMENT* -- we haven't discussed the command-line environment yet in this series, although it is next on the list. 129 | For now, you can ignore this section. 130 | 131 | *COMPATIBILITY* -- this section will only be present if the command has potential compatibility problems; perhaps it doesn't quite comply with a standard or something like that. 132 | 133 | *LEGACY DESCRIPTION* -- some commands have changed their behaviour over time. 134 | This section is where the old behaviours will be documented. 135 | This is really only useful when working with old scripts which might still be assuming the command's old behaviour. 136 | 137 | *BUGS* -- if there are known problems with the command or known conditions which cause unusual or undesirable behaviour, they may be listed in this section. 138 | 139 | *HISTORY* -- this can be a fun section, and is usually very short, and details the origins of the command. 140 | E.g. 141 | the HISTORY section of the `ls` man page tells us that "`An ls command appeared in Version 1 AT&T UNIX`". 142 | 143 | *AUTHOR* -- details the authors of the command being documented. 144 | 145 | *COPYRIGHT* -- the copyright information for the command being documented. 146 | 147 | == Understanding the SYNOPSIS Section 148 | 149 | When you're first learning about a command, the DESCRIPTION section is probably the most useful to you, but when it comes to relearning something you were once familiar with, the SYNOPSIS section is often the most useful. 150 | Although it's short, it's very dense with information. 151 | However, to be able to extract the meaning from this short section you need to understand the meaning of the formatting: 152 | 153 | *`BOLD TEXT`* -- any text in bold should be entered verbatim 154 | 155 | [.underline]#`UNDERLINED`# /`_ITALIC_` -- any text that is either in italics or underlined (depending on your version of man, usually underline in modern OSes) needs to be replaced with a real value as described by the text. 156 | E.g. 157 | [.underline]`file` should be replaced with the path to an actual file. 158 | 159 | `...` -- anything followed by an ellipsis (three dots) can be optionally repeated 160 | 161 | `[]` -- anything contained within square brackets is optional 162 | 163 | `|` -- the pipe symbol should be read as '`or`' 164 | 165 | == Final Thoughts 166 | 167 | The most important thing is not to be afraid of man pages. 168 | At first, they will seem archaic and confusing, but you'll soon get used to their style, and you might even come to like it! 169 | There is no substitute for practice though -- the only way to learn to read man pages is to read man pages! 170 | 171 | Finally, let's end on a really bad nerd joke! 172 | 173 | ==== 174 | Q: How do you know woman are more complicated than men? 175 | 176 | A: Because you can man man, but you can't man woman! 177 | 178 | [source,console?prompt=$] 179 | ---- 180 | $ man woman 181 | No manual entry for woman 182 | $ 183 | ---- 184 | 185 | ==== 186 | -------------------------------------------------------------------------------- /book/ttt21.adoc: -------------------------------------------------------------------------------- 1 | [[ttt21]] 2 | = TTT Part 21 of n {longdash} More Searching 3 | include::variables.adoc[] 4 | 5 | This is the third and final instalment on searching. 6 | In the <> on `find`, we learned how to search for text within files and streams using `egrep`. 7 | In <>, we learned to search for files based on all sorts of criteria with the `find` command. 8 | 9 | In this final instalment, we'll start by looking at one last feature of `find`, its ability to execute commands on the files it finds. 10 | Then we'll end by looking at an OS X-only alternative to `find` that makes use of the Spotlight search index to really speed up searches. 11 | 12 | .Matching Podcast Episode 21 13 | **** 14 | 15 | Listen Along: Taming the Terminal Podcast Episode 21 16 | 17 | // no audiocontrols in pdf 18 | ifndef::backend-pdf,apple-books[] 19 | 20 | audio::{url-mp3}/TTT21MoreSearching/TTT_21_More_Searching.mp3[] 21 | endif::[] 22 | 23 | Scan the QRcode to listen on a different device 24 | 25 | image::qrcodes/TTT_21.png[QRcode, align='left'] 26 | 27 | You can also {url-mp3}/TTT21MoreSearching/TTT_21_More_Searching.mp3[play/download the MP3 in your browser] 28 | 29 | **** 30 | 31 | == Executing Commands with `find` 32 | 33 | The final trick `find` has up its sleeves is that it can be used to execute a given command on all the files it finds. 34 | Depending on the command you choose to execute, this could be VERY dangerous indeed, so tread carefully! 35 | Definitely think twice before using the execute feature in `find`å to delete files! 36 | 37 | To execute commands on the results of `find` you need to use the `-exec` flag in conjunction with the `{}` flag and either the `';'` or `'+'` flags. 38 | The reason there are two end flags is that there are two modes in which `find` can execute commands. 39 | It can either execute the same command once on each file that was found or, it can execute the given command once only with all the found files as arguments. 40 | 41 | === Executing a Command on Each File/Folder Found 42 | 43 | To execute a command repeatedly, once on each file or folder found, you use the following construct: 44 | 45 | [source,shell] 46 | ---- 47 | find search_path conditions -exec command args_or_flags {} ';' 48 | ---- 49 | 50 | The `-exec` flag means we are about to start specifying a command to execute, and everything up to the `';'` will be a part of that command. 51 | `{}` is the point in the command where the found file should be inserted. 52 | 53 | This sounds quite complicated, but hopefully, a practical example will help. 54 | A real-world problem you may encounter is that you need to make all Perl scripts in a given set of nested folders executable. 55 | As we learned in <>, we can make a file executable with the command: 56 | 57 | [source,shell] 58 | ---- 59 | chmod 755 path_to_file 60 | ---- 61 | 62 | Perl scripts have the extension `.pl`, so using what we learned in the previous instalment we can find all Perl scripts in a given path with the command: 63 | 64 | [source,shell] 65 | ---- 66 | find search_path -name '*.pl' 67 | ---- 68 | 69 | If we assume all our Perl files will be in a folder called `scripts` in our Documents folder, we can put all this together to find and `chmod` all Perl files in a single command like so: 70 | 71 | [source,shell] 72 | ---- 73 | find ~/Documents/scripts -name '*.pl' -exec chmod 755 {} ';' 74 | ---- 75 | 76 | === Executing A Command Once with All Files/Folders Found as Arguments 77 | 78 | Sometimes we may want to run a command once with all the found files and/or folders as arguments. You can do that with the following construct: 79 | 80 | [source,shell] 81 | ---- 82 | find search_path conditions -exec command args_or_flags {} '+' 83 | ---- 84 | 85 | Like before, `{}` indicates where the found files and folders should be included in the command, and the `'+'` on the end indicates the end of the command, and that the command should be run once with all the results as arguments. 86 | 87 | Again, a practical example might be helpful. 88 | Let's say you're doing up a report on just how much work went into a coding project. 89 | You want to know how many lines of code you wrote, and you know that all your code is in Perl scripts and Perl modules, i.e. 90 | you know all relevant files have `.pl` and `.pm` file extensions. 91 | 92 | We know from last time that we can find all relevant files with the command: 93 | 94 | [source,shell] 95 | ---- 96 | find search_path -name '*.pl' -or -name '*.pm' 97 | ---- 98 | 99 | We also know from <> that we can use the `wc` command with the `-l` flag to count the number of lines in one or more files: 100 | 101 | [source,shell] 102 | ---- 103 | wc -l file 1..n 104 | ---- 105 | 106 | Assuming our code is still in a folder called `scripts` in the Documents folder, the command to find the total number of lines in all the Perl files would be: 107 | 108 | [source,shell] 109 | ---- 110 | find ~/Documents/scripts '(' -name '*.pl' -or -name '*.pm' ')' -exec wc -l {} '+' 111 | ---- 112 | 113 | Note that we have to group the two conditions in bracket operators so the scope of the `-or` is clear. 114 | 115 | If you installed the XKPasswd 2 Perl module via the quick install instructions at https://github.com/bbusschots/xkpasswd.pm[], you can use the example below to see how many lines of code and documentation went into that project: 116 | 117 | [source,shell] 118 | ---- 119 | find /usr/local/xkpasswd.pm '(' -name '*.pl' -or -name '*.pm' ')' -and -not -type d -exec wc -l {} '+' 120 | ---- 121 | 122 | One final example that might depress you -- the command below tells you how much disk space you are wasting with large files (>500MiB) in your downloads folder: 123 | 124 | [source,shell] 125 | ---- 126 | find ~/Downloads -size +500M -exec du -ch {} '+' 127 | ---- 128 | 129 | If you are VERY careful you can use `find -exec` to do things like clean up cache folders by deleting anything older than a given amount of time, and other cool and powerful things. 130 | But -- ALWAYS be careful when using -exec to invoke a command that alters or destroys files or folders. 131 | My approach is to run the command without the `-exec` first, to be sure ONLY the files and folders you expected to be found are being returned. 132 | 133 | Finally -- the nerd joke I think I promised during the last instalment: 134 | 135 | [source,shell] 136 | ---- 137 | find / -iname '*base*' -exec chown -R us {} ';' 138 | ---- 139 | 140 | (If you don't get it, https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us[this might help].) 141 | 142 | == OS X Only {longdash} Spotlight from the Terminal 143 | 144 | On OSX the operating system indexes the files on your computer so you can quickly search them with Spotlight. 145 | Rather than having to search through all the files, Spotlight just searches the index, which makes it much faster than `find` when searching through big chunks of the file system. 146 | 147 | Apple has very kindly exposed the power of Spotlight to the command line with the very useful `mdfind` command. 148 | 149 | If you can type it into the Spotlight text box in the top-left of a Finder window and get back a list of files, you can pass the same query to `mdfind`, and it will find the same results. 150 | Note that I said Spotlight in the Finder, and not in the menubar -- that was not by accident. 151 | `mdfind` is only for finding files, not for all the other fancy stuff you can do with Spotlight in the menu bar like the calculator function or the ability to get dictionary definitions. 152 | Another important caveat is that `mdfind` can only find files in folders indexed by Spotlight. 153 | If you add a drive or a folder to Spotlight's ignore list, `mdfind` can never find files on those drives or folders. 154 | 155 | The `mdfind` command is very easy to use: 156 | 157 | [source,shell] 158 | ---- 159 | mdfind 'spotlight search string' 160 | ---- 161 | 162 | For example, to find all PDFs on your computer you could use: 163 | 164 | [source,shell] 165 | ---- 166 | mdfind 'kind:pdf' 167 | ---- 168 | 169 | To find all PDFs that contain the word '`internet`' you could use: 170 | 171 | [source,shell] 172 | ---- 173 | mdfind 'kind:pdf internet' 174 | ---- 175 | 176 | To find every PDF you have edited today you could use: 177 | 178 | [source,shell] 179 | ---- 180 | mdfind 'date:today kind:pdf' 181 | ---- 182 | 183 | I haven't been able to find a definitive list of all possible Spotlight search commands, but googling for '`spotlight syntax`' will lead to useful articles like https://osxdaily.com/2010/01/06/improve-your-spotlight-searches-with-search-operators/[this one]. 184 | 185 | mdfind supports a number of arguments, and it can also search based on deep metadata, but I'm going to leave most of that as an exercise for the user -- you can get the full documentation through the manual: 186 | 187 | [source,shell] 188 | ---- 189 | man mdfind 190 | ---- 191 | 192 | However, there are two flags I do want to draw attention to. 193 | 194 | By default `mdfind` will search the entire Spotlight index, but you can ask it to only return results contained within a given folder using the `-onlyin` flag, for example, to find all PDFs in your Documents folder you could use: 195 | 196 | [source,shell] 197 | ---- 198 | mdfind -onlyin ~/Documents 'kind:pdf' 199 | ---- 200 | 201 | Note that the search is always recursive, even when using the `-onlyin` flag. 202 | 203 | The other flag I want to mention is `-count`. If this flag is set the number of matching files will be returned rather than the files themselves. 204 | So, to see how many music files you have in your Music folder you could use: 205 | 206 | [source,shell] 207 | ---- 208 | mdfind -onlyin ~/Music -count 'kind:music' 209 | ---- 210 | 211 | Or, to answer the eternal question of just how many apps you have installed: 212 | 213 | [source,shell] 214 | ---- 215 | mdfind -onlyin /Applications -count 'kind:app' 216 | ---- 217 | 218 | == Final Thoughts 219 | 220 | We have now seen how to filter streams and search files with `egrep`, and we've learned how to search for files with `find` and `mdfind`. 221 | That brings us to the end of the searching topic, at least for now. 222 | The next big topic will be networking, but before we start into such a big topic we'll take a break for a fun little tips and tricks instalment. 223 | -------------------------------------------------------------------------------- /book/ttt22.adoc: -------------------------------------------------------------------------------- 1 | [[ttt22]] 2 | = TTT Part 22 of n {longdash} Tips & Tricks 3 | include::variables.adoc[] 4 | 5 | 6 | This instalment is a little breather between the fairly heavy instalments on searching and the upcoming set of instalments on networking. 7 | We'll start with a look at some tips and tricks for getting the most out of BASH, and then transition to some tips and tricks for getting the most out of the OS X Terminal app. 8 | 9 | .Matching Podcast Episode 22 10 | **** 11 | 12 | Listen Along: Taming the Terminal Podcast Episode 22 13 | 14 | // no audiocontrols in pdf 15 | ifndef::backend-pdf,apple-books[] 16 | 17 | audio::{url-mp3}/TTT22TipsAndTricks/TTT_22_Tips_and_Tricks.mp3[] 18 | endif::[] 19 | 20 | Scan the QRcode to listen on a different device 21 | 22 | image::qrcodes/TTT_22.png[QRcode, align='left'] 23 | 24 | You can also {url-mp3}/TTT22TipsAndTricks/TTT_22_Tips_and_Tricks.mp3[play/download the MP3 in your browser] 25 | 26 | **** 27 | 28 | == Bash Tips & Tricks 29 | 30 | === Repeating Previous Commands 31 | 32 | Bash provides a number of different ways to repeat commands you've executed in the past. 33 | The simplest command of all of these is `!!`. 34 | You can use this on its own: 35 | 36 | [source,console?prompt=bart$,highlight='1,5'] 37 | ---- 38 | cc-dsk-2ss:Desktop bart$ ls -l 39 | total 96 40 | -rw-r--r--@ 1 bart staff 21301 1 Oct 15:15 Screen Shot 2014-10-01 at 15.15.44.png 41 | -rw-r--r--@ 1 bart staff 20982 1 Oct 15:15 Screen Shot 2014-10-01 at 15.15.55.png 42 | cc-dsk-2ss:Desktop bart$ !! 43 | ls -l 44 | total 96 45 | -rw-r--r--@ 1 bart staff 21301 1 Oct 15:15 Screen Shot 2014-10-01 at 15.15.44.png 46 | -rw-r--r--@ 1 bart staff 20982 1 Oct 15:15 Screen Shot 2014-10-01 at 15.15.55.png 47 | cc-dsk-2ss:Desktop bart$ 48 | ---- 49 | 50 | You'll see that when you issue `!!` as a command, the first thing it does is print out what it is that is being executed, then it does it. 51 | 52 | You don't have to use !! 53 | on its own, you can use it to represent your previous command as part of a new, larger command. 54 | For example, you may want to try a command to be sure it does what you think, and then, when you know it does, pipe the output to a file, or to another command: 55 | 56 | [source,console?prompt=bart$,highlight='1,4'] 57 | ---- 58 | cc-dsk-2ss:Desktop bart$ find ~/Downloads -iname '*.iso' 59 | /Users/bart/Downloads/CentOS-6.5-x86_64-bin-DVD1.iso 60 | /Users/bart/Downloads/CentOS-6.5-x86_64-LiveDVD.iso 61 | cc-dsk-2ss:Desktop bart$ !! | wc -l 62 | find ~/Downloads -iname '*.iso' | wc -l 63 | 2 64 | cc-dsk-2ss:Desktop bart$ 65 | ---- 66 | 67 | The `!!` command lets you go back just a single command, you can go back further using the up arrow key (and the down arrow key if you go past the command you wanted by mistake). 68 | 69 | [TIP] 70 | ==== 71 | By default Bash on OS X (and RHEL/CentOS Linux) saves every command you execute into its history, so if you run the same command four times in a row, you will have to hit the up arrow four times to get past it in the history. 72 | You can alter this behaviour by setting the environment variable `HISTCONTROL` to the value `ignoredups`. 73 | If you want to configure Bash in this way you'll want to set that environment variable automatically each time you open a new Terminal, so to do that you need to add the line below into `~/.bash_profile`: 74 | 75 | [source,shell] 76 | ---- 77 | export HISTCONTROL=ignoredups 78 | ---- 79 | 80 | Ubuntu does this by default, and I find it a much nicer way of working, so much so that I add the above command to my `~/.bash_profile` on all my Macs. 81 | ==== 82 | 83 | Scrolling through the Bash history is very useful, but sometimes you need to do a more powerful search of previously executed commands, this is where the reverse history search comes in. 84 | To enter into this search mode hit kbd:[Ctrl+r], your prompt is now replaced with: 85 | 86 | [source,shell] 87 | ---- 88 | (reverse-i-search)': 89 | ---- 90 | 91 | As you type, what you enter will appear before the `:`, and the most recent matching command will appear after the `:`. 92 | To accept a match just hit enter and you'll return to the regular prompt with that command entered and your cursor positioned at the end of the command. 93 | To search for older matches to the same search string hit kbd:[Ctrl+r] again, and if you go past the one you wanted, hit kbd:[Ctrl+Shift+r] to go the other way. 94 | This all sounds more complicated than it is, and with a little practice, you'll soon get the hang of it. 95 | 96 | === Moving the Cursor to the Start of a Command 97 | 98 | You can move the cursor within a command with the left and right arrow keys, but if you use the up and down arrows or kbd:[Ctrl+r] to search the history your cursor will always be placed at the end of the command, and you will often need to edit the start of the command. 99 | You can just use the left arrow key until you get there, but with long commands this can be a real pain. 100 | kbd:[Ctrl+a] will jump the cursor to the start of the command. 101 | 102 | == OS X Terminal Tips & Tricks 103 | 104 | === Dragging & Dropping 105 | 106 | If you drop a file or folder onto the Terminal its path will be typed into the Terminal. 107 | This includes proxy icons at the top of document windows, the folder proxy icons at the top of Finder windows, and the folder proxy icon at the top of other Terminal windows. 108 | 109 | image::ttt22/exampletxt.png[Drag and Drop Examples] 110 | 111 | === Opening Files & Folders From the Terminal 112 | 113 | You can use the `open` command to open files from the Terminal as if you had double-clicked them in the Finder. 114 | The usage is very simple: 115 | 116 | [source,shell] 117 | ---- 118 | open PATH_TO_FILE [...] 119 | ---- 120 | 121 | With this basic usage, OS X will open the file with the default app for the given file type. 122 | If you use `open` on a folder then that folder will open in the Finder. 123 | For example, you can open the current folder your Terminal is in with the command: 124 | 125 | [source,shell] 126 | ---- 127 | open . 128 | ---- 129 | 130 | The `open` command is also very useful for accessing hidden folders in the Finder, e.g.: 131 | 132 | [source,shell] 133 | ---- 134 | open ~/Library 135 | ---- 136 | 137 | If you want to open a file or folder with an app that is not the default app, you can use the `-a` flag to tell `open` which app to open the file or folder with. 138 | For example, the following command will open your ~/.bash_profile file in TextEdit: 139 | 140 | [source,shell] 141 | ---- 142 | open ~/.bash_profile -a /System/Applications/TextEdit.app/ 143 | ---- 144 | 145 | Because using a text editor is a common thing to want to do, `open` supports a shortcut especially for opening files in TextEdit. 146 | Rather than using `-a System/Applications/TextEdit.app/`, you can just use `-e` instead, so we could re-write the previous command as: 147 | 148 | [source,shell] 149 | ---- 150 | open ~/.bash_profile -e 151 | ---- 152 | 153 | Finally, you can also use `open` to reveal a given file in the Finder, you can do that with the `-R` flag. 154 | E.g.: 155 | 156 | [source,shell] 157 | ---- 158 | open -R /etc/hosts 159 | ---- 160 | 161 | Note that this will not work for hidden files. 162 | 163 | == Final Thoughts 164 | 165 | Hopefully, you'll find at least some of these tips and tricks useful, and find yourself being a little more efficient on the command line. 166 | 167 | In the next instalment, we'll make a start on what will be a quite long series on networking. 168 | We'll start by laying a theoretical foundation, and then get stuck in with a selection of network-related terminal commands. 169 | -------------------------------------------------------------------------------- /book/variables.adoc: -------------------------------------------------------------------------------- 1 | // switch to experimental so we can show keyboard buttons 2 | :experimental: 3 | // Define unicode for Apple Command key. 4 | ifndef::backend-pdf[:commandkey: ⌘] 5 | ifdef::backend-pdf[:commandkey: Cmd] 6 | // Define longdash 7 | :longdash: — 8 | // Some urls 9 | :imagesdir: assets 10 | :url-mp3: https://media.blubrry.com/tamingtheterminal/archive.org/download 11 | :icons: font 12 | -------------------------------------------------------------------------------- /ci/release-info.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import re 4 | import sys 5 | from datetime import date 6 | 7 | # inspired by https://github.com/input-output-hk/jormungandr/blob/master/ci/release-info.py 8 | 9 | def read_version(release_file, ref=None): 10 | """ 11 | Reads the version from the release file, 12 | and optionally validates it against the given tag reference. 13 | """ 14 | 15 | with open (release_file, 'r') as read_file: 16 | d = json.load(read_file) 17 | version = d['version'] 18 | 19 | if ref is not None and ref != 'refs/tags/v' + version: 20 | print( 21 | '::error file={path}::version {0} does not match release tag {1}' 22 | .format(version, ref, path=release_file) 23 | ) 24 | sys.exit(1) 25 | return version 26 | 27 | 28 | event_name = sys.argv[1] 29 | 30 | date = date.today().strftime('%Y%m%d') 31 | 32 | ref = None 33 | if event_name == 'push': 34 | ref = os.getenv('GITHUB_REF') 35 | if ref.startswith('refs/tags/'): 36 | release_type = 'tagged' 37 | elif ref == 'refs/heads/ci/test/nightly': 38 | # emulate the nightly workflow 39 | release_type = 'nightly' 40 | ref = None 41 | else: 42 | raise ValueError('unexpected ref ' + ref) 43 | elif event_name == 'schedule': 44 | release_type = 'nightly' 45 | else: 46 | raise ValueError('unexpected event name ' + event_name) 47 | 48 | version = read_version('release.json', ref) 49 | prerelease = 'false' 50 | if release_type == 'tagged': 51 | tag = 'v' + version 52 | elif release_type == 'nightly': 53 | version = re.sub( 54 | r'^(\d+\.\d+\.\d+)(-.*)?$', 55 | r'\1-nightly.' + date, 56 | version, 57 | ) 58 | tag = 'nightly.' + date 59 | prerelease = 'true' 60 | 61 | for name in 'version', 'date', 'tag', 'release_type', 'prerelease': 62 | print('::set-output name={0}::{1}'.format(name, globals()[name])) 63 | -------------------------------------------------------------------------------- /docs/. prettierignore: -------------------------------------------------------------------------------- 1 | *.json 2 | -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/.DS_Store -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | ttt.bartificer.net -------------------------------------------------------------------------------- /docs/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/.DS_Store -------------------------------------------------------------------------------- /docs/assets/cover-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/cover-small.png -------------------------------------------------------------------------------- /docs/assets/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/cover.png -------------------------------------------------------------------------------- /docs/assets/creativecommons.org_by-nc-nd_4.0_88x31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/creativecommons.org_by-nc-nd_4.0_88x31.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_01.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_02.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_03.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_04.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_05.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_06.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_07.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_08.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_09.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_10.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_11.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_12.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_13.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_14.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_15.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_16.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_17.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_18a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_18a.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_18b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_18b.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_19.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_20.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_21.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_22.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_23a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_23a.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_23b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_23b.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_24.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_25a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_25a.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_25b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_25b.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_26.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_27a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_27a.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_27b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_27b.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_28.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_29.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_30.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_31.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_32.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_33.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_34.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_35.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_36.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_37.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_37A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_37A.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_38.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_39.png -------------------------------------------------------------------------------- /docs/assets/qrcodes/TTT_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/qrcodes/TTT_40.png -------------------------------------------------------------------------------- /docs/assets/ttt1/Screen-Shot-2013-04-13-at-15.29.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt1/Screen-Shot-2013-04-13-at-15.29.39.png -------------------------------------------------------------------------------- /docs/assets/ttt1/Screen-Shot-2013-04-13-at-15.30.07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt1/Screen-Shot-2013-04-13-at-15.30.07.png -------------------------------------------------------------------------------- /docs/assets/ttt18/Screen-Shot-2014-05-10-at-17.49.36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt18/Screen-Shot-2014-05-10-at-17.49.36.png -------------------------------------------------------------------------------- /docs/assets/ttt18/Screen-Shot-2014-05-10-at-17.55.51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt18/Screen-Shot-2014-05-10-at-17.55.51.png -------------------------------------------------------------------------------- /docs/assets/ttt18/Screen-Shot-2014-05-10-at-18.14.12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt18/Screen-Shot-2014-05-10-at-18.14.12.png -------------------------------------------------------------------------------- /docs/assets/ttt18/Screen-Shot-2014-05-10-at-18.17.19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt18/Screen-Shot-2014-05-10-at-18.17.19.png -------------------------------------------------------------------------------- /docs/assets/ttt2/Screen-Shot-2013-04-26-at-20.47.07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt2/Screen-Shot-2013-04-26-at-20.47.07.png -------------------------------------------------------------------------------- /docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.01.29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.01.29.png -------------------------------------------------------------------------------- /docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.11.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.11.39.png -------------------------------------------------------------------------------- /docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.16.18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt2/Screen-Shot-2013-04-26-at-21.16.18.png -------------------------------------------------------------------------------- /docs/assets/ttt2/Screenshot_26_04_2013_20_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt2/Screenshot_26_04_2013_20_28.png -------------------------------------------------------------------------------- /docs/assets/ttt22/exampletxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt22/exampletxt.png -------------------------------------------------------------------------------- /docs/assets/ttt23/512px-IP_stack_connections.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt23/512px-IP_stack_connections.svg.png -------------------------------------------------------------------------------- /docs/assets/ttt24/1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt24/1a178fa7-0a88-4f67-8273-e2ec2c0900fa.png -------------------------------------------------------------------------------- /docs/assets/ttt24/512px-IP_stack_connections.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt24/512px-IP_stack_connections.svg.png -------------------------------------------------------------------------------- /docs/assets/ttt24/HomeRouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt24/HomeRouter.png -------------------------------------------------------------------------------- /docs/assets/ttt24/fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt24/fcedfaa3-f075-4d2a-87fe-48c813c25b9d.png -------------------------------------------------------------------------------- /docs/assets/ttt25/3d970446-33cb-4cc8-8358-5040cb13b8d0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/3d970446-33cb-4cc8-8358-5040cb13b8d0.png -------------------------------------------------------------------------------- /docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD-original.png -------------------------------------------------------------------------------- /docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-BAD.png -------------------------------------------------------------------------------- /docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good-original.png -------------------------------------------------------------------------------- /docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/HomeNetwork-WirelessAccessPoint-Good.png -------------------------------------------------------------------------------- /docs/assets/ttt25/HomeRouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/HomeRouter.png -------------------------------------------------------------------------------- /docs/assets/ttt25/SubnetWorkflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt25/SubnetWorkflow.png -------------------------------------------------------------------------------- /docs/assets/ttt27/DNSHierarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt27/DNSHierarchy.png -------------------------------------------------------------------------------- /docs/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22-300x241.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22-300x241.png -------------------------------------------------------------------------------- /docs/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt27/Screen-Shot-2015-01-16-at-15.00.22.png -------------------------------------------------------------------------------- /docs/assets/ttt27/f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt27/f106e4d1-f8fe-4f75-9a19-67f355fa73fa.png -------------------------------------------------------------------------------- /docs/assets/ttt29/d411bff4-5d3d-452f-932b-d1176196f32e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt29/d411bff4-5d3d-452f-932b-d1176196f32e.png -------------------------------------------------------------------------------- /docs/assets/ttt31/Screen-Shot-2015-04-04-at-14.53.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt31/Screen-Shot-2015-04-04-at-14.53.39.png -------------------------------------------------------------------------------- /docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.50.png -------------------------------------------------------------------------------- /docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.33.58.png -------------------------------------------------------------------------------- /docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.34.54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.34.54.png -------------------------------------------------------------------------------- /docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.51.48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt34/Screen-Shot-2015-05-09-at-17.51.48.png -------------------------------------------------------------------------------- /docs/assets/ttt38/Screenshot-2020-07-11-at-12.59.30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt38/Screenshot-2020-07-11-at-12.59.30.png -------------------------------------------------------------------------------- /docs/assets/ttt38/Screenshot-2020-07-11-at-13.43.52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt38/Screenshot-2020-07-11-at-13.43.52.png -------------------------------------------------------------------------------- /docs/assets/ttt38/Screenshot-2020-07-11-at-16.15.55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt38/Screenshot-2020-07-11-at-16.15.55.png -------------------------------------------------------------------------------- /docs/assets/ttt39/Screenshot-2020-07-25-at-16.52.40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt39/Screenshot-2020-07-25-at-16.52.40.png -------------------------------------------------------------------------------- /docs/assets/ttt4/Screen-Shot-2013-05-11-at-18.52.30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt4/Screen-Shot-2013-05-11-at-18.52.30.png -------------------------------------------------------------------------------- /docs/assets/ttt6/Basic_Unix_File_Permission_Masks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/assets/ttt6/Basic_Unix_File_Permission_Masks.png -------------------------------------------------------------------------------- /docs/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/favicon-16x16.png -------------------------------------------------------------------------------- /docs/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/favicon-32x32.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartificer/taming-the-terminal/57315b755186f41aa685f9f50ef43058431ae0a6/docs/favicon.ico -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Taming the Terminal 21 | 26 | 27 | 28 | 29 |