- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh and command history
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
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
тАО07-05-2007 07:43 AM
тАО07-05-2007 07:43 AM
I am working on HPUX system. I access the system using my personal id and then I run sudo ksh to enter as a super user.
I am facing one problem after running sudo. I am not able to run the previous command which I ran as a super user using short cut key k. Is it easy to fix this issue?
Regards
PAdma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 07:54 AM
тАО07-05-2007 07:54 AM
Re: ksh and command history
# set -o vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 07:56 AM
тАО07-05-2007 07:56 AM
Re: ksh and command history
Thanks for the help but it doesn't work :-(
Regards
Padma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 08:29 AM
тАО07-05-2007 08:29 AM
Re: ksh and command history
first check/list the command history via
fc -l
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 08:32 AM
тАО07-05-2007 08:32 AM
Re: ksh and command history
Here is the output
fc -l
ksh: fc: no history file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 08:36 AM
тАО07-05-2007 08:36 AM
Re: ksh and command history
The root '.profile' should also contain:
# export HISTFILE=${HOME}/.sh_history
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 09:00 AM
тАО07-05-2007 09:00 AM
Re: ksh and command history
I have echoed the $HISTFILE and it results
/homes/indigo/padmaasr/.sh_history
padmaasr@tthp49: ls -al /homes/indigo/padmaasr/.sh_history
-rwx------ 1 root sys 70932 Jul 5 14:56 /homes/indigo/padmaasr/.sh_history
When I open the .sh_history file under my home directory it says permission denied. I have working as a super user and my id shows the following output.
padmaasr@tthp49: id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users),111(security),299(opcgrp),555(www),711(nt)
Regards
Padma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 09:23 AM
тАО07-05-2007 09:23 AM
SolutionYou could change the way of the history for root to match the individual user:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=901609&admit=-682735245+1183670098597+28353475
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 09:29 AM
тАО07-05-2007 09:29 AM
Re: ksh and command history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2007 08:39 PM
тАО07-05-2007 08:39 PM
Re: ksh and command history
If I try, it gets either corrupted or it doesn't work because root has no privileges to write to my NFS home directory.
So before I do, I typically reset HISTFILE:
$ HISTFILE=/tmp/.sh_history sudo ...