Where to start First steps track · 15 stages
Linux Labs

How a command is built — options and arguments

cheat sheet · Ubuntu 24.04 · Bash 5.2 https://lab.dimsanych.ru/en/wiki/command-syntax/

Cheat sheet

  • ls -l -a /etc a command, two options, an argument
  • ls -la /etc short options can be combined
  • ls --all --human-readable long options
  • head -n 5 app.log an option with a value
  • head --lines=5 app.log a long option with a value
  • cp "my file.txt" docs/ a space in the name — quote it
  • rm -- -file.txt after -- only arguments
  • ls --help | less short help on options
  • man ls the full manual
  • mkdir logs && cd logs the second runs if the first succeeded
Loading…