Sponsored Content
Top Forums Shell Programming and Scripting [ksh] how to reload history file without entering a command Post 303027884 by DevuanFan on Thursday 27th of December 2018 10:04:56 AM
Old 12-27-2018
[ksh] how to reload history file without entering a command

I'm basically looking for the ksh equivalent of bash's PROMPT_COMMAND="history -r", where simply redrawing the command prompt in a terminal will cause ksh to reload the history file.

At the risk of sounding incredibly lazy (in which case I would be guilty as charged), I've noticed that if I have two terminals open--call them terminal A and terminal B--and run some commands in terminal A, I can only see those commands in terminal B (while scrolling up and down through the history) after I execute a command in terminal B. What I would like is for me to be able to just press enter at the command prompt in terminal B--without having to execute a command--and then be able to see the commands from terminal A.

Is there a setting in .kshrc that would force the shell to reload the history file each time the command prompt is drawn?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

entering a long command

hello everyone! Very basic question for the guru's in here but anyways, I am trying to type a command that is longer than the line. What character do I use to continue my command on the next line? Thanks in advance.... Todd (1 Reply)
Discussion started by: hedrict
1 Replies

2. UNIX for Dummies Questions & Answers

ksh: how to make [up arrow] recall command history

I want to get my up arrow key to recall my previous commands in Korn shell. Anyone help please? thanks a bunch! BG (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

3. UNIX for Dummies Questions & Answers

Reload user crontab file

Hi Guys, Our user crontab files are located at /var/spool/cron/crontabs. I have to make some modifications to it. I have all the crontab entries in a file called 'crontab.actual'. I made changes to this file and now I want to reload these changes from the crontab.actual file to my crontab... (12 Replies)
Discussion started by: vandi
12 Replies

4. Solaris

Command for checking modification history on file

What is the command for checking modification history on file? ---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ---------- Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Discussion started by: jastanle84
6 Replies

5. Shell Programming and Scripting

What is the ksh equivalent to bash's "history -c" command?

Hi, What is the korn shell equivalent of bash shell's "history -c" command? I do know, how to clear the history list in ksh, I can do the following: > ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Discussion started by: royalibrahim
1 Replies

6. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

7. UNIX for Dummies Questions & Answers

Command to reload a zone

I just created a CNAME and i was told a zone needs to be reloaded after creating a CNAME. What is the command to reload a zone after the CNAME has been created? Thanks in advance (1 Reply)
Discussion started by: German Shepherd
1 Replies

8. Shell Programming and Scripting

UNIX CO command for file version history

Hello :) I'm a newb when it comes to shell scripting and was wondering about a command(s) for a script that could be used to checkout a certain number of version/revision histories of a file. I know for the latest revison you "co filename" or for a certain revision number "co -r*.* filename"... (2 Replies)
Discussion started by: MN-DBA
2 Replies

9. AIX

Checking the command history file in AIX

Hello, The system has been rebooted and I need to see the commands executed in the system prior to restart by the oracle user.The history command is not showing me the commands executed prior to reboot. Please advise. Best regards, Vishal (1 Reply)
Discussion started by: Vishal_dba
1 Replies

10. Shell Programming and Scripting

Script not entering VRFY after nc command

I am making a bash script right now and am running into an issue. As I am new to scripting, I do not know exactly what to do to get what I'm looking for in my script. Essentially, my script will automatically input VRFY common names after nc Example: nc 192.168.248.133 25 VRFY Allison... (2 Replies)
Discussion started by: ksrhayward
2 Replies
getty(8)						      System Manager's Manual							  getty(8)

NAME
getty - Sets the terminal type, modes, speed, and line discipline SYNOPSIS
getty [-h] [-t time] line speed_label terminal line_discipline getty -c file FLAGS
Hold the carrier during the initialization phase;do not hang up. Set the time period to the specified number of seconds. Drop the line after that amount of time if nothing is typed. Check the specified gettydefs file. DESCRIPTION
The getty command sets and manages terminals by setting up speed, terminal flags, and the line discipline. If command flags are provided, getty adapts the system to those specifications. getty prints the login prompt, waits for the user to enter a username, and invokes the login command. getty uses the /etc/gettydefs file for terminal information. The line argument refers to the device name in /dev. The speed_label argu- ment is a pointer into the /etc/gettydefs file where the definitions for speed and other associated flags are located. The terminal argu- ment specifies the name of the terminal type. The line_discipline argument specifies the name of the line discipline. The second syntax for the getty command provides a check option. When getty is invoked with the -c option and filename argument, it checks the specified file in the same way it scans gettydefs for terminal information, then prints the results to standard output. By default, the getty daemon writes the login string specified in the message field of the /etc/gettydefs file to any terminal spawned or respawned from the /etc/inittab file. If an /etc/issue file present, getty reads the file and writes its contents to the terminal prior to writing the login string specified in the /etc/gettydefs file. FILES
Specifies the command path. Specifies the terminal line database file. Specifies the path name for the issue identification file RELATED INFORMATION
Commands: init(8), login(1), stty(1) Files: issue(4). delim off getty(8)
All times are GMT -4. The time now is 06:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy