HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Any way to fix corrupted $HISTORY file?
Operating System - HP-UX
1829323
Members
2082
Online
109989
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
10-03-2003 09:34 AM
10-03-2003 09:34 AM
Any way to fix corrupted $HISTORY file?
Hello all,
I changed root's default home (/) to (/root). It seems that in the process my $HISTORY file ($HOME/.sh_history) got corrupted. Everytime I do (su -) I get a core dump and I can't use the root account. I need to "su" root without the dash (so it won't run the .profile).
I had months of HISTORY there and I don't want to loose it. I still can see the contents of the file but as you many know this is not a 100% ASCII file so I can't know for sure what line is corrupted. I don't want to loose my HISTORY. Any way to make it work again?
thanks,
Jorge Fabregas
I changed root's default home (/) to (/root). It seems that in the process my $HISTORY file ($HOME/.sh_history) got corrupted. Everytime I do (su -) I get a core dump and I can't use the root account. I need to "su" root without the dash (so it won't run the .profile).
I had months of HISTORY there and I don't want to loose it. I still can see the contents of the file but as you many know this is not a 100% ASCII file so I can't know for sure what line is corrupted. I don't want to loose my HISTORY. Any way to make it work again?
thanks,
Jorge Fabregas
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 09:42 AM
10-03-2003 09:42 AM
Re: Any way to fix corrupted $HISTORY file?
Actually, .sh_history is an ascii text file, I just checked on a D320 with 11i on it.
All you need to do is go to the new home directory and do this:
touch .sh_history
make sure permissions are -rw-r--r-- and that root owns it and its part of sys group.
chown root:sys .sh_history
Make sure the HISTFILE variable is correct in .profile and or /etc/profile and you are done.
solution.
SEP
All you need to do is go to the new home directory and do this:
touch .sh_history
make sure permissions are -rw-r--r-- and that root owns it and its part of sys group.
chown root:sys .sh_history
Make sure the HISTFILE variable is correct in .profile and or /etc/profile and you are done.
solution.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 09:56 AM
10-03-2003 09:56 AM
Re: Any way to fix corrupted $HISTORY file?
Hi,
That doesn't work. The $HISTORY file is not really an ASCII file. (even though it looks like one). There are some special characters there. Check this thread:
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x316a0ea029a2d711abdc0090277a778c%2C00.html&admit=716493758+1065214841083+28353475
thanks,
Jorge
That doesn't work. The $HISTORY file is not really an ASCII file. (even though it looks like one). There are some special characters there. Check this thread:
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x316a0ea029a2d711abdc0090277a778c%2C00.html&admit=716493758+1065214841083+28353475
thanks,
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 11:39 AM
10-03-2003 11:39 AM
Re: Any way to fix corrupted $HISTORY file?
Hi Jorge,
Believe you may be out of luck here.
I've never seen one "restored" properly.
As Bill hints, it's probably by design.
You could set up a cron to copy it off with a date/time stamp periodically....
Rgds,
Jeff
Believe you may be out of luck here.
I've never seen one "restored" properly.
As Bill hints, it's probably by design.
You could set up a cron to copy it off with a date/time stamp periodically....
Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP