- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: History command
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
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
тАО04-22-2010 02:03 AM
тАО04-22-2010 02:03 AM
I am working in HPVM machine, OS 11.31 and I want to see previous command for that i am given history command but i got error.
# history
sh: fc: Cannot access or open the history file.
Anyone can assist me why history command are not working.
Thanks & Regards,
Dev
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 02:06 AM
тАО04-22-2010 02:06 AM
Re: History command
Put these variables in your .profile:
export HISTFILE=$HOME/sh_history
export HISTSIZE=5000
Then, logout and login again and you will have the command history enabled.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 02:09 AM
тАО04-22-2010 02:09 AM
Re: History command
export HISTFILE=$HOME/.sh_history
export HISTSIZE=5000
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 02:21 AM
тАО04-22-2010 02:21 AM
Re: History command
I have done all the task but still a getting error
Value of TERM has been set to "xterm".
WARNING: YOU ARE SUPERUSER !!
#
#
# history
sh: fc: Cannot access or open the history file.
after exporting histsize and histfile i have logout and than login but same error.
Regards,
Dev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 02:25 AM
тАО04-22-2010 02:25 AM
Re: History command
Try setting HISTFILE to a explicit full path name wherever root's home really is, like "HISTFILE=/.sh_history" or "HISTFILE=/root/.sh_history".
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 03:37 AM
тАО04-22-2010 03:37 AM
Re: History command
echo $ HOME
/
After that i have given HISTFILE=/root/.sh_history
but still i am facing error.
# history
sh: fc: Cannot access or open the history file.
Regards,
Dev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 03:40 AM
тАО04-22-2010 03:40 AM
Re: History command
Are you setting HISTFILE & HISTSIZE in the user's .profile ?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 03:44 AM
тАО04-22-2010 03:44 AM
Re: History command
HISTFILE=/root/.sh_history
do you have
/root ???
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 03:54 AM
тАО04-22-2010 03:54 AM
Re: History command
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2010 03:55 AM
тАО04-22-2010 03:55 AM
Re: History command
No, I haven't set in users profile.
I am root user and want to previous command with the help of history command. For that i done export HISTFILE=/root/.sh_history
HISTFILE=500
Than logout than again login with root use but after giveing history command same error.
Regards,
Dev