Results 1 to 6 of 6

Thread: Print out command history...

  1. #1
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Print out command history...

    Hi Opensuse People,

    I was just wondering how you print out the history of all the commands you entered at a terminal and append to a file..

    /jlar

  2. #2
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Print out command history...

    Simple and non-elegant: history > myhistory.txt

    edit: if you want to append use two pipes; history >> myhistory.txt
    Have a lot of fun!

  3. #3
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Re: Print out command history...

    Thanks very much...

  4. #4
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Print out command history...

    Quote Originally Posted by Magic31 View Post
    edit: if you want to append use two pipes; history >> myhistory.txt
    that's not a pipe, it's a redirector that's a pipe: |

  5. #5
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Print out command history...

    hehehe.. true, good thing I never post these things where others can read it.

    Thanks,
    Wj
    Have a lot of fun!

  6. #6

    Default Re: Print out command history...

    history command reads ~.bash_history file. U can use this file too.

    HTH,
    Vinu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •