Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

muthuveerappan

macrumors newbie
Original poster
Aug 17, 2008
15
0
Hi,

I work on multiple tabs on the terminal, and I want to clear the previous commands typed in the current tab of the terminal window.

Is there a way to do this ?

Note - I don't want to clear the command history on all the tabs of the terminal.

Thanks in advance.

Regards,
Muthu
 
If I am not wrong, the command clear would only clear the screen.

I am looking for something to clear the previous commands (clear previous commands in the current tab only)
 
but that would remove the history of commands in all tabs.

I want to delete the history of the commands specific to a tab.

Not sure it is possible in the first place.

I guess rm .bash_history would be the only possible solution.

Thanks a lot!
 
Yea, I think Terminal/Bash only has the one history file so I don't believe it keeps separate tabs/windows separate in terms of command histories. I'm not at my Mac to try though. You could always issue a few commands in each tab (different commands) and print out the bash history file to see what's going on in there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.