linux delete last 2 from history code example Example: delete history linux range $ for line in $(seq 1800 1816) ; do history -d 1800; done