![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with the History command | cleansing_flame | UNIX for Dummies Questions & Answers | 2 | 02-04-2008 09:25 AM |
| Command history in AIX | priya_v111 | Shell Programming and Scripting | 2 | 09-18-2006 11:48 AM |
| History command | akash_wagh | Filesystems, Disks and Memory | 0 | 08-31-2005 02:54 AM |
| command history | vikasdeshmukh | UNIX for Dummies Questions & Answers | 3 | 11-14-2001 02:37 AM |
| History Command | jack | UNIX for Dummies Questions & Answers | 2 | 08-01-2001 10:01 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
There is a file in your home directory called .sh_history. To clear your history, just empty this file
From your home directory: echo "" > .sh_history You can also limit the size of your history file (in KSH) by setting the HISTFILE variable. See this thread |
|
#3
|
|||
|
|||
|
To limit the history file in last 100 commands. Put the follows in your profile.
export HISTSIZE=100
__________________
tikual :) |
|
#4
|
|||
|
|||
|
also you can dump your cammand history to stdout with the
'history' command. |
|
#5
|
||||
|
||||
|
Hello everyone,
first of all user google: echo "" > .sh_history i tried your suggested command and yes it does overwrite the .sh_history file with a line. But when i use the command history, it still shows me all of my commands!!! I want to delete the history of commands. Can you suggest something on that? Second of all user tikul: export HISTSIZE=100 yes i wrote that in my .profile file but i still get 500+ commands! Can you comment on that? And finally Mr. Hedensk you asked me to dump my command history with 'history' command. It didn't work as expected. What exactly should i do here? Now this is very likely possible that i might have misunderstood you all and didn't do it as it is supposed to be done. But can you all please try and point out my mistake or a possible explanation for it |
|
#6
|
|||
|
|||
|
well what i ment by 'dump' was that it would output its contents to your screen. not empty the history.
|
|
#7
|
||||
|
||||
|
O ok
|
||||
| Google The UNIX and Linux Forums |