Command history


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Command history
# 1  
Old 01-26-2014
Command history

hi
i want to show my history command in UNIX solaris ( bash shell ),,
i tried this command ( HISTTIMEFORMAT="%d/%m/%y %T " )
but it's not working with me ,, is there any restricted condition to do this command
any one know why it's not working to me ..

thanks
# 2  
Old 01-26-2014
that sets the format, then you type history and it has the date and time in it now.
# 3  
Old 01-26-2014
Following post answered by Scott might help you.

[Solved] How to clear "history" command entries?? by Scott - UNIX for Dummies Questions & Answers - Unix Linux Forums

Regards,
Akshay

--edit--

Did you source your bash profile after setting it ?

Code:
$ source /path/to/your_bash_profile


Last edited by Akshay Hegde; 01-26-2014 at 06:11 AM..
# 4  
Old 01-26-2014
thank you for respond ( neutronscott )
i already did that but the history keep shown without date

---------- Post updated at 05:22 AM ---------- Previous update was at 05:19 AM ----------

thank you (Akshay Hegde )
but i really don't understand what you mean by ( source your bash profile after setting it )
i'm new on unix and linux so make it simple for me please Smilie

---------- Post updated at 05:34 AM ---------- Previous update was at 05:22 AM ----------

ok guys ,, i got something here ,, I was write the command with lower case keyboard so this is why i got nothing at the first place ^_^

but now i have another problem which is the whole history came at the same day ,, and definitly that is not correct
# 5  
Old 01-26-2014
Quote:
Originally Posted by mondo32
thank you for respond ( neutronscott )
i already did that but the history keep shown without date

---------- Post updated at 05:22 AM ---------- Previous update was at 05:19 AM ----------

thank you (Akshay Hegde )
but i really don't understand what you mean by ( source your bash profile after setting it )
i'm new on unix and linux so make it simple for me please Smilie

---------- Post updated at 05:34 AM ---------- Previous update was at 05:22 AM ----------

ok guys ,, i got something here ,, I was write the command with lower case keyboard so this is why i got nothing at the first place ^_^

but now i have another problem which is the whole history came at the same day ,, and definitly that is not correct
It's very simple

In .bashrc or .bash_profile you have to enter this information. Check which one( .bashrc or .bash_profile) you are using.

file path will be /home/user/ (whoami)

1.Open terminal

2. Editor which you use (example : vi, nano, gedit ,medit,etc)
$ editor ~/.bashrc or $ editor ~/.bash_profile

3. Add this line to file which is opened HISTTIMEFORMAT="%d/%m/%y %T ", save file and quit.

4. On terminal Type $ source ~/.bashrc or $ source ~/.bash_profile

5. Now type $ history on your terminal
# 6  
Old 01-27-2014
thank you very much ^_^ i will give it try and i'll tell you what happens
# 7  
Old 01-28-2014
thank you (Akshay Hegde )
sadly i do everything but the history still not shown ,, i don't know why ,, is it possible to be caused by the version of the bash I using

thank you again
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

History command

How to get the other user history file. I would like to check the commands issues from my teammate. (1 Reply)
Discussion started by: Mariappan.m
1 Replies

2. UNIX for Dummies Questions & Answers

The history command: See other users command history

Can anyone tell this: If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used. Thanks in advance for your help. Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

3. UNIX for Advanced & Expert Users

history command

Hi, I want the command which has to tell all the commands used in different terminals of same Unix box. Command "history" will give the commands used in the same terminal. Advance thanks for your response. (1 Reply)
Discussion started by: senkerth
1 Replies

4. UNIX for Dummies Questions & Answers

history command

hi, i had to submit a project into a directory. i copied it from my location to the specified folder, no problemo. just one thing though. after i copied and searched for the time i copied using the history command, the system would not show. even using the up arrow key would not display my... (0 Replies)
Discussion started by: iluvsushi
0 Replies

5. UNIX for Dummies Questions & Answers

vi command history

How do you look at the whole list of previous commands you have used in VI? I know you can use the up and down arrows, but I know there's a way to see the full list. (5 Replies)
Discussion started by: cokedude
5 Replies

6. Shell Programming and Scripting

History Command

Hi all experts, I want to see all the command that is typed in the server 3 days ago. I typed HISTORY command but it does not show all the things. The reason is my senior DBA could see all the commands ran in the server 3 days ago but i cannot see. Please let me know is there anyway i can view... (6 Replies)
Discussion started by: ma466
6 Replies

7. Shell Programming and Scripting

need help in history Command

in my system history command is set to 60 how to remove all the command status even if i give history command. i mean: if i give history command in unix it should not show anything.........how to achieve this (2 Replies)
Discussion started by: ali560045
2 Replies

8. UNIX for Dummies Questions & Answers

Command history

Hello everyone, I am aware about the history command we use in bash. Just had a question regarding the history of commands. Is there any way i can limit my commands to be remembered or is there any way to delete the commands used by myself? Thank you (8 Replies)
Discussion started by: a25khan
8 Replies

9. UNIX for Dummies Questions & Answers

command history

Dear all, I am using solaris 6 O.S. and root previlege.I want to know how to get history of commands given by diff. users logged into the server. I know that history command gives the list of previous commands for that particular log in session. In the simillar manner can I get simillar history... (3 Replies)
Discussion started by: vikasdeshmukh
3 Replies

10. UNIX for Dummies Questions & Answers

History Command

Hi I am using ksh shell, and I am unable to use the command !n (where n is the number in the history list). Please help me... :confused: (2 Replies)
Discussion started by: jack
2 Replies
Login or Register to Ask a Question