Skip to Content
Navigation:

A stick figure smiling

This is a page from an upcoming zine called "The Secret Rules of the Terminal".

To get an email when the zine comes out, sign up for the zine announcements list!

Image of a comic. To read the full HTML alt text, click "read the transcript". browse more comics! get the zine!
read the transcript!

basic file stuff

  • touch - create file
  • mkdir - create directory
  • cp - copy
  • mv - move
  • rm - delete
  • ln - create symlink
  • ls - list directory

how big is it

  • wc - word count
  • du - file size in bytes
  • df - filesystem usage

slice & dice files

  • sed - replace regex
  • tr - replace character
  • grep - search file
  • cut - get column
  • awk - get column (+ more)
  • sort - sort lines
  • uniq - unique lines
  • head - first 10 lines
  • tail - last 10 lines

filesystems

  • mount - mount a filesystem
  • umount - unmount
  • dd - copy data to a disk

manage processes

  • ps - list processes
  • lsof - list open files
  • kill - send a signal
  • pkill - fancy kill
  • top - who’s using CPU?
  • uptime - time since reboot

permissions

  • chown - change owner
  • chmod - change permissions

time stuff

  • time - measure runtime
  • date - current time
  • sleep - wait X seconds
  • cal - cute calendar

useful with pipes

  • less - scroll text
  • cat - print file contents
  • tee - stdin -> file + stdout
  • xargs - run cmd for each line
  • find - find files by name

compression

  • tar - make/extract tar files
  • gzip - compress with gzip
  • gunzip - decompress
  • zip - compress with zip
  • unzip - decompress

& more

  • which - find cmd on PATH
  • man - read man page
  • crontab - edit crontab
  • md5sum - calculate md5sum
  • diff - diff files

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)