Troubleshooting

🧪 Scenario

You’re helping debug an old codebase. You need to explore, search, and clean up the environment.

Steps

  1. Visualize the folder and file structure.
  2. Search for the word "ERROR" in any .log file.
  3. Make a script called run_analysis.sh executable.
  4. Review past commands.
  5. Clear the terminal.
tree

grep "ERROR" *.log

chmod +x run_analysis.sh

history

clear
tree

Select-String -Pattern "ERROR" -Path *.log

Set-ExecutionPolicy RemoteSigned -Scope Process

Get-History

Clear-Host