Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-==command buffer==-

Status
Not open for further replies.

Norberto

IS-IT--Management
Jun 13, 2000
46
PT
When I type some root command's all this command's are in buffer, with shortcut ' ESC+K ' I have access for all command's were typed. But I don't know if this command's are writing in one file, it is??? Witch file???
It's possible I know what time was typed the lastest command's???
Is possible clean all buffer command's???
This works like DOSKEY in DOS.

Sorry about my English :-(
 
Norberto, don't worry about your English - it's just fine. If you're using ksh, the command history is in a file called .sh_history in your home directory - do an ls -la to see it listed. You can delete this file with the usual rm command, and list it's contents to another file with cat .sh_history > histlist or similar. As far as I know there is no timestamp included in this file. HTH.
 
I read about it, but when I open the file with scoedit there are notthink inside, I only see all commands with cat .sh_history. So, when I do cat .sh_history > historico there are nothink inside to. The owner is root,sys & --wr------, could be the permissions of the file, no???
-----------------------------------------------------------
When I remove the file --> rm .sh_history the commnads aren't cleanned, all commands are display with shortcut ' ESC+K 'again , that means exist any other file contains all commnads like .sh_history, write??
 
Norberto, .sh_history is a strange one. As I mentioned above, it's possible to cat it to a file, then vi that file and remove the control chars within it. This should enable you to see your command history. HTH.
 
strings ~/.sh_history > histfile would save you a lot of editing time!

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top