Learn › Linux Foundations
Special
Utility commands that serve specific purposes. Use true and false for exit codes in scripts, and script to record terminal sessions.
Labs in this module
- true - Meet true, the command that does nothing and always succeeds. It prints nothing and exits 0, so you reveal that hidden result with echo $?.
- false - Meet false, the mirror image of true: it prints nothing and always exits 1. See the failure with echo $?, trigger the fallback it guarantees
- script - Record a whole terminal session to a file with script. Name the file, exit to save, -a to append, -c to capture one command, and -q to recor
- Operation Black Box - The Special module capstone mission. Drill script, true, and false in one hands-on operation on a real Linux VM: record a session with scrip