Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi All, Can some one help me, how can i check the history of the commands executed in my MYSQL DB server which is in SUSE LINUX?...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42

    Command to see the history

    Hi All,

    Can some one help me, how can i check the history of the commands executed in my MYSQL DB server which is in SUSE LINUX?

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Code:
    history
    
    and see man history
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    How can i delete my history?

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Delete .bash_history file in your home folder.
    Code:
    rm ~/.bash_history
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    What is the difference between history and bash_history?
    Is that any specific option to remove a selected lines in the history?

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    history is just a command that reads .bash_history file. Open .bash_history file and delete commands that you dont want to be displayed by history command.

    Code:
    nano ~/.bash_history
    Or
    Open .bash_history in your fav GUI text editor like kate or gedit.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    I dont have any text editor, so please tell me how to open the bash_history, cant i open it with vi ?

  8. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    vi /home/[login name]/.bash_history

    You can see the list of commands and edit them if you want .

    BTW - Are you trying to hide something from your boss
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  9. #9
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    Hi,

    I have edited and seen using history command,
    But the edited also listed in it.

    What may be issue?

  10. #10
    Just Joined!
    Join Date
    Dec 2007
    Location
    chennai-TN,India
    Posts
    42
    Got it thanks to all.

Page 1 of 2 1 2 LastLast

Posting Permissions

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