Sponsored Content
Top Forums Shell Programming and Scripting Replicate history commands in multiple terminal Post 302526630 by radoulov on Wednesday 1st of June 2011 04:56:29 AM
Old 06-01-2011
You could use something like this:

Code:
cat <<! >> "$HOME"/.bashrc
shopt -s histappend
PROMPT_COMMAND='history -n; history -a'
!

You'll need to press ENTER to re-sync the history when you pass from one terminal to another.

For more details check this.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Combining elements of different commands in history

What is the correct format for a single command that would combine portions of 2 different lines in the command history? I'm using a C shell. Here's a simplified command history to clarify: 4 rm file1 5 ls -ld file2 file3 file4 6 cat file 5 With the above history, what would be the... (5 Replies)
Discussion started by: Dbyte
5 Replies

2. Solaris

History commands

Dear What's the command to be executed to retreive all history commands for a specific user? (1 Reply)
Discussion started by: abu_hassan
1 Replies

3. Linux

history of commands

I would like to log all the commands I type (on the terminal) to a file. The command "history" does this only for current terminal only. I typically keep around 10 terminals open. Thanks, j Note: I do not have root access. (2 Replies)
Discussion started by: superuser84
2 Replies

4. Shell Programming and Scripting

How to kill history from terminal to others using same id

I have a application ID and many users in the team are using this id. I dont want the people to check whati am running with the id from my terminal. is there a way to kill history get back from my console to everybody so thatwhat ever i type in my console cant be seen from other users who are... (5 Replies)
Discussion started by: dsravan
5 Replies

5. UNIX for Dummies Questions & Answers

Add pseudo terminal to bash history

Hello, Could you tell me if it is possible to add pseudo terminal name to the bash history? I need to see from which terminal the command was issues. I found a variable HISTTIMEFORMAT that helps me to identify the time but cannot find similar thing for the pts number. thanks, Pavel. (0 Replies)
Discussion started by: pn8830
0 Replies

6. Shell Programming and Scripting

How to clear history logs of all terminal sessions

Hi, I would normally clear off the history entries from a terminal by using the following commands: > ~/.bash_history history -c But this will remove the entries of that particular session only. How to prune all the entries of all login sessions for a particular user in a system? N.B:... (3 Replies)
Discussion started by: royalibrahim
3 Replies

7. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

8. UNIX for Dummies Questions & Answers

Hiding history of my commands

i have several boxes running either ubuntu, redhat or solaris. there are multiple people with root access on these boxes. i really dont like people looking through my command history, is there a way i can prevent this? what files do i have to edit to prevent anyone from being able to see what... (7 Replies)
Discussion started by: SkySmart
7 Replies

9. Shell Programming and Scripting

history commands

Hi Guys, I am running RHEL5, I am trying to find out the history of the cammands that were executed on my server. I have files that are missing I just want to find out what happened to them. I used history | more but I can't find anything related to my query. I also checked... (1 Reply)
Discussion started by: Phuti
1 Replies

10. Shell Programming and Scripting

commands History

how to list all commands history for a username during a certain time ? Maany Thanks (2 Replies)
Discussion started by: Sara_84
2 Replies
BROWSER-HISTORY(1)					      General Commands Manual						BROWSER-HISTORY(1)

NAME
browser-history - external history of web browsers, such as netscape SYNOPSIS
browser-history [ options ] DESCRIPTION
Browser-History is a client-side X daemon maintaining a browser-independent global history of all the web sites you visited. Its usage is very simple, just put the following line in your .xinitrc or your X start-up script: browser-history & And open the file ~/.browser-history/history-log.html and bookmark it. Browser-history came from the will to overcome a Netscape bug: there was no global history, and if you close a window, its whole history is lost. For people browsing lots of sites, having a possibility to track back where one has been before means that you don't have to put everything in your bookmarks file. If you are not sure if a site may be worth remembering, don't add it in your bookmarks. If you need it later, just browse your history files. Later, it came to our minds that this also could be a valuable add-on to people writing experimental browsers, so they dont have to add this functionality to their browser itself. Browser-history is a small and efficient daemon. Real user services could be built on top of the log files it maintains for more possibili- ties (graphical representation, advanced search options, collective histories). It can be seen as a quick-and-dirty hack wrt to the general solution of using a personal proxy to provide this history and housekeeping facilities. But in the meantime, it is easy to use and it works. IMPLEMENTATION
Browser-History spies your web browser and logs in ~/.browser-history/history-log.html all the URLs you went through. You can then browse the log under Netscape or other browsers via the URL: file:~/.browser-history/history-log.html (replace the ~ by your home directory). It tracks automagically all already present browser windows, and all new ones created in the future. This program has no user interface. It just appends information to a log file in html format so you can browse it through a web browser. If more that one hour has passed since last entry, it draws an horizontal lines, and adds H1 headers to delimit new days. Each week (Sunday mornings), it archives the week his- tory, compresses it by gzip (that you must have in your path), and starts a new history with links to the older ones. To make room you can just remove the obsolete history files. You can search files for string XXX in shell via: zgrep XXX ~/.browser-history/* This version (2.6) works with Netscape, Arena and Amaya. URLs can be excluded from logging by putting them, one per line in the file ~/.browser-history/history-log.exclude , then, if an URL begins with a line from this file, it is not logged. In this file, empty lines or lines beginning by # are comments This file is read once at startup, and re-read when receiving the signal 1. e.g: # We exclude local files file: # Exclude search engines... http://home.netscape.com http://guide.infoseek.com When browser-history is run, it looks if another one is running, and by default it kills the previous one if it is an older version. Other- wise, it the new one is the same version number or older, it just aborts. OPTIONS
All options can be given by their first letter: you can specify either -verbose or -v, but you cannot group options, e.g. you must say -v -k , but not -vk -display display_name Specifies X display, otherwise contents of $DISPLAY is used -verbose outputs information on what it is doing. useful for debug. -Version prints version number and exit. -logdir directory which directory to store files into? defaults to ~/.browser-history -gzip gzip_filename the complete path to the gzip compressor. Defaults to "gzip". E.g: -gzip /usr/gnu/bin/gzip -seconds delay if two entries are made are more than delay seconds apart, an horizontal rule will separate them, else just a simple line break. Defaults to one hour (3600). -replace If there is an already running browser-history on the display, aborts. Default is to replace it only if the version is older than ours. -noreplace If there is an already running browser-history on the display, aborts. Default is to replace it only if the version is older than ours. -kill If there is an already running browser-history on the display, kills it, then terminates immediately in all cases. -DontGrab Never Grab the X Server, which might cause deadlocks while debugging, when browser-history or gdb tries to print on the grabbed xterm or emacs. -checkpoint Cause the currently running instance of browser-history to save a list of all the URLs and their titles that are currently being viewed by a browser-history compatible browser to the normal history file as a "checkpoint". LOG FILE FORMAT
A log file can have some decorative HTML to represent days, but each entry has the form: (on a single line since version 2.4) separator <b>name</b> <a href="URL">URL</a> YYYY/MM/DD-HH:MN:SS <small>windowid</small> where the following items are: separator: either <hr> or <br> name: the name of the document (window title) URL: its URL YYYY/MM/DD-HH:MN:SS: year, month number, day number, hour, minutes, seconds. (2-digit numbers) windowid: the X window ID of the browser window, in hexadecimal Note: Before version 2.4, the 4 sub-parts were separated by newlines, but since 2.4, they are only blank-separated to ease searching for URL in log files via "grep". Note: Before version 2.5, the year was stored in 2 digits. Now it is stored in 4 (or more :-) digits, to fix this Y2K bug HOME
The latest version of browser-history can be found at: http://koala.ilog.fr/ftp/pub/browser-history/ and its WWW home page, with full technical documentation is at: http://www.inria.fr/koala/colas/browser-history AUTHOR
Colas Nahaboo, http://www.inria.fr/koala/colas COPYRIGHT
browser-history bears the same license as the X Window System: you can do everything with this code (selling it, modifying it), except suing me or using my name in your advertisements, or expecting any kind of support or guarantee. local BROWSER-HISTORY(1)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy