SadServers
  • Scenarios
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • Documentation
    FAQ Pro Accounts Business Accounts Gift Support API Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up

"Tokelau": Delete from history

Scenario: "Tokelau": Delete from history

Level: Medium

Type: Do

Tags: bash  

Access: Email

Description: Inspired by this nixCraft article.

The objective of this exercise is to delete all the Bash history lines that contain the term foo.

Clearing out or deleting the history file /home/admin/.bash_history is not allowed. Note that in our case, new commands (including the ones to try and delete "foo" from history) are also appended to the history file.

Root (sudo) Access: False

Test: Running history |grep "foo" returns nothing.

The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.

Time to Solve: 15 minutes.

Send Us Feedback
Get Notified
For announcements like new scenarios. We'll never share your email with anyone else.
SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-02-26 18:17 UTC – cbaeb13