Tame Your History: Big, Deduped, Durable, Timestamped
MediumCommand Line Guru15-25 minA bare shell is hostile to productivity: it keeps a tiny history, records every duplicate command, OVERWRITES the history file on every exit (so two terminals clobber each other), and stamps nothing with a time. Fix all of it in a drop-in.
Write /root/.bashrc.d/productivity.sh so that, when sourced, the shell has: a large history (HISTSIZE and HISTFILESIZE both at least the value in /root/case/brief.txt), duplicate suppression (HISTCONTROL), append-don't-clobber (shopt -s histappend), and timestamps (HISTTIMEFORMAT). Grading sources your file in a clean shell and inspects the result, so any correct syntax counts — but don't wrap it in an interactive-only guard. See /root/case/brief.txt.
- Raise HISTSIZE and HISTFILESIZE to the required floor
- Drop duplicate commands with HISTCONTROL
- Turn on histappend so shells append instead of overwriting the history file
- Add timestamps with HISTTIMEFORMAT
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
