- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: root cannot use the function of recalling his...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 11:26 PM
11-21-2005 11:26 PM
root cannot use the function of recalling history command !
export EDITOR=vi
export HISTFILE=$HOME/.sh_history
export HISTSIZE=100
set –o vi
But after I use the command “su - oracle “ , and then login to system with this another account under the same /sbin/sh shell environment:. I really
can use use the function of recalling history command (such as ESC+ k)! I have already check all the .profile files' contents, and there is no any other special settings in the profiles !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 11:32 PM
11-21-2005 11:32 PM
Re: root cannot use the function of recalling history command !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 11:50 PM
11-21-2005 11:50 PM
Re: root cannot use the function of recalling history command !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2005 11:58 PM
11-21-2005 11:58 PM
Re: root cannot use the function of recalling history command !
does root have a
.sh_history
file? If not, try creating it.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 01:24 AM
11-22-2005 01:24 AM
Re: root cannot use the function of recalling history command !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 12:03 PM
11-22-2005 12:03 PM
Re: root cannot use the function of recalling history command !
Does the root account that firstly logins to system really cannot use the function of recalling history commands?!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 12:13 PM
11-22-2005 12:13 PM
Re: root cannot use the function of recalling history command !
root no doubt can use this. Only thing to look into will be the existance of .sh_history file in root's home directory with permission to write for root.
Also after logging in through root find wheather the HISFILE variable is getting exported or not by
#echo $HISTFILE
How are you trying to recall history. For Posix shell it should be using Esc+k whereas for oracle user if the shell is not posix it may be some other key sequence as well.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 01:57 PM
11-22-2005 01:57 PM
Re: root cannot use the function of recalling history command !
In additional, I find that the /sbin/sh and /usr/bin/sh are two different static program, it means that /sbin/sh is not linked to /usr/bin/sh!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 02:04 PM
11-22-2005 02:04 PM
Re: root cannot use the function of recalling history command !
/sbin/sh is the shell for user root whereas /usr/bin/sh is the shell for normal users. These have to be like this only and nothing is unusual in this.
The problem seems to be due to some juck character in .profile or file permission issue only.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 02:21 PM
11-22-2005 02:21 PM
Re: root cannot use the function of recalling history command !
#export EDITOR=vi
#export HISTFILE=$HOME/.sh_history
#export HISTSIZE=100
#set -o vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 06:51 PM
11-22-2005 06:51 PM
Re: root cannot use the function of recalling history command !
log in as root
and try the following command
cat .sh_history and see wheater ur seeing any lines added to that file..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 08:50 PM
11-22-2005 08:50 PM
Re: root cannot use the function of recalling history command !
in $HOME directory of root user / or /root directory touch a file .profile with permission as,
-r--r--r-- bin:bin permission.
In that put all those as,
echo "history enablement - Started"
export EDITOR=vi
export HISTFILE=$HOME/.sh_history
export HISTSIZE=100
set -o vi
echo "history enablement - Done"
and save it.
Login with new terminal with root user. You can see history enablement * messages.
# ls
# hostname
# history
it will give details.
Another check point:
# alias
Do you have like,
history='fc -l'
it has to be there.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 10:08 PM
11-22-2005 10:08 PM
Re: root cannot use the function of recalling history command !
Why!? Why it took no effect when I input the same settings manually!? (I hope that Muthukumar can continue to explain somewhat the result)
Whatever, I should thank all of you , espeically for Muthukumar!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2005 10:33 PM
11-22-2005 10:33 PM
Re: root cannot use the function of recalling history command !
Example:
root-shell1#settings of above
root-shell1#set -o vi
root-shell1#ls
root-shell1#history
1 ls
like that.
root-shell1#su
root-shell2#
no settings of root-shell1 will be here. To keep that setting try to put in .profile file of that user or /etc/profile file for all users. (root -> normal user.. normal user1 -> normal user2 and normal user -> root)
To keep that setting for all users then put that settings in /etc/profile.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2005 04:05 PM
11-24-2005 04:05 PM
Re: root cannot use the function of recalling history command !
I eventually found my problem why I couldnâ t use the the function of recalling history command!
I had made a slight and ignore mistake every time after I manually input the same settings under the shell environmrnt prompt symbol. But this mistake was indeed â fatalâ that I had not run the command of history to wake up that current shell's history command!! So after I run the command of history, the function of recalling history command work normally! That is all !
Thank all of you very much again, especially Muthukumar!!!