LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 July 31 2013

TheStunMan
Member

[Linux] Retrieve Logs after using History -c

Greetings,

If someone used "history -c" as root, is there a possible way to retrieve the history of commands used even after clearing the history, there should be a file that saves all the logs. [OS is Red Hat]

Regards.

Offline

#2 July 31 2013

Joe
Member

Re: [Linux] Retrieve Logs after using History -c

`history` will usually save the commands in a file in the user's home directory. They're usually hidden files (names start with a dot).

Try to check in a user's home dir for a file named:

  • .history

  • .bash_history

  • .*history

Offline

#3 July 31 2013

TheStunMan
Member

Re: [Linux] Retrieve Logs after using History -c

rahmu wrote:

`history` will usually save the commands in a file in the user's home directory. They're usually hidden files (names start with a dot).

Try to check in a user's home dir for a file named:

  • .history

  • .bash_history

  • .*history

Neither files are found, i'm accessing via ftp to the server and all hidden files are visible. So i'm sure these are not found.

Any other way ?

Offline

#4 July 31 2013

Joe
Member

Re: [Linux] Retrieve Logs after using History -c

Not that I know of.

Keep in mind that this should only keep a list of the commands you entered in your shell. So it's useful to remember certain commands or certain arguments of the commands. But if you want to investigate what happens in your system there are other log files.

Virtually every command that modified something on your computer will be logged in a file in /var/log/*.

Offline

Board footer