Jump to content

Search the Community

Showing results for tags 'linux history'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • General Discussion
    • Artificial Intelligence
    • DevOpsForum News
  • DevOps & SRE
    • DevOps & SRE General Discussion
    • Databases, Data Engineering & Data Science
    • Development & Programming
    • CI/CD, GitOps, Orchestration & Scheduling
    • Docker, Containers, Microservices, Serverless & Virtualization
    • Infrastructure-as-Code
    • Kubernetes & Container Orchestration
    • Linux
    • Logging, Monitoring & Observability
    • Security, Governance, Risk & Compliance
  • Cloud Providers
    • Amazon Web Services
    • Google Cloud Platform
    • Microsoft Azure

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


LinkedIn Profile URL


About Me


Cloud Platforms


Cloud Experience


Development Experience


Current Role


Skills


Certifications


Favourite Tools


Interests

Found 1 result

  1. Linux is a command-based operating system that relies primarily on commands to execute tasks. During a terminal session, you run various commands; noting them is not feasible as it can be time-intensive. That’s why the history command is handy to view previously run commands in the terminal. It helps you recall and reuse earlier commands and troubleshoot unexpected system behavior. So this short blog will briefly explain how to use the history command in Linux, including its usage, options, and some examples. How To Use the history Command in Linux You can run the below command to check the history of the previously executed commands: history The above command, by default, shows a list of up to 1,000 commands. If you wish to view a specific number of commands, go for the below command: history N Where N is the required number of preceding commands. For example, to see the last 3 commands executed, we will enter: history 3 Please combine history with the grep command to search for a particular earlier command. For instance, to search for occurrences of cd: history | grep cd If you want to reuse any previous commands, please check that command’s line number. For example, let’s reuse the cd ~/Documents available in the 9th row: !9 If you want to clear the history, then please use the -c option: history -c Moreover, the ‘-d N’ option deletes a specific entry at N. For example, let’s delete the history from raw 200 to 275: history -d 200-275 A Quick Wrap-up The history command is a valuable tool in Linux’s range of commands. It allows you to recall and manage previously executed commands. This blog demonstrated how to use the history command with practical examples. Furthermore, we explained two primary options to manage the command history. View the full article
  • Forum Statistics

    43.5k
    Total Topics
    42.9k
    Total Posts
×
×
  • Create New...