10

I know how History command works in linux and also that it only displays the commands typed from terminal from that very directory in which the history command was executed,,Isn't it?My intent is to display all the commands typed(History) by me (as a user per se) .

Thanks in advance .

Web Devie
  • 1,207
  • 1
  • 13
  • 30
user3040487
  • 181
  • 1
  • 3
  • 7

2 Answers2

23

You can use the

history

command, it displays all the history, and is not taking into consideration the 'very directory in which the history command was executed'.

You can output it to a file by using

history >> file.txt

To see more about the history command, you can visit

http://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/x1712.htm

  • well,,i guess no it doesn't help :/ or maybe the command i am looking for is atleast 5 days old ! .. let me do a fresh example to it now and i ll let you know . – user3040487 Dec 02 '13 at 05:23
3

$ history > history_for_print.txt

Milovan Tomašević
  • 6,823
  • 1
  • 50
  • 42