Find the answer to your Linux question:
Results 1 to 2 of 2
I'm logged in as root and I can see that someone else from a questionable ip is logged in as root too. Is there a way to see the history ...
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Posts
    22

    History for different tty

    I'm logged in as root and I can see that someone else from a questionable ip is logged in as root too. Is there a way to see the history on a different tty in this case mine is pts/1 and theirs is pts/0

    Thanks.

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Not right now, as your command history is stored in a buffer. You can add this to the ~/.bashrc (or /etc/profile, /etc/bashrc, anything that is sourced when you log in):

    Code:
    shopt -s histappend
    export PROMPT_COMMAND='history -a'
    This tells BASH to append the history (not overwrite) and to do so every time you return to prompt.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

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