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 /etca command, two options, an argument -
ls -la /etcshort options can be combined -
ls --all --human-readablelong options -
head -n 5 app.logan option with a value -
head --lines=5 app.loga long option with a value -
cp "my file.txt" docs/a space in the name — quote it -
rm -- -file.txtafter -- only arguments -
ls --help | lessshort help on options -
man lsthe full manual -
mkdir logs && cd logsthe second runs if the first succeeded