Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • That assumes he has already listed the history and knows all IDs beforehand
    – Markoorn
    Commented Jan 15, 2019 at 8:19
  • and it cannot be the lastest in the history list, otherwise: "history position out of range"
    – devwebcl
    Commented Sep 24, 2019 at 13:19
  • 1
    it must be: for i in {511..520}; do history -d $i; echo "history -d 511"; done
    – devwebcl
    Commented Sep 24, 2019 at 15:25