- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell history not being written to specified h...
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-24-2009 07:12 AM
тАО04-24-2009 07:12 AM
Shell history not being written to specified history file
HISTFILE=$HOME/.$LOGNAME"_history"
date>>$HISTFILE
#print -s "### login at `/usr/bin/date` ###"
export HISTFILE
HISTSIZE=500
export HISTSIZE
All I get in my history file is the date/time I log in:
Thu Apr 23 15:47:13 CDT 2009
Fri Apr 24 10:03:04 CDT 2009
Fri Apr 24 10:04:34 CDT 2009
All of the command history is still being stored in .sh_history.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 07:20 AM
тАО04-24-2009 07:20 AM
Re: Shell history not being written to specified history file
If the home directory is on NFS may not work.
I would try setting it this way:
HISTFILE="${HOME}/.${LOGNAME}_history"
SEP
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
тАО04-24-2009 07:22 AM
тАО04-24-2009 07:22 AM
Re: Shell history not being written to specified history file
# env |grep HIST
HISTFILE=/tmp/.sh_history.root
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 07:55 AM
тАО04-24-2009 07:55 AM
Re: Shell history not being written to specified history file
Try setting the variable in your home account .profile and logging out and back in again and you it should work ok :
vi .profile
~
~
alias checkfs='/home/markme/bin/monitor_fs/check_fs.sh'
HISTFILE=$HOME/.$LOGNAME"_history"
export HISTFILE
~
~
/home/markme# ls -ail .markme*
9381 -rw------- 1 markme users 48 Apr 24 16:53 .markme_history
gba70102:/home/markme#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 08:32 AM
тАО04-24-2009 08:32 AM
Re: Shell history not being written to specified history file
Here's the output of env|grep HIST:
env|grep HIST
HISTFILE=/home/bsimpson/.bsimpson_history
HISTSIZE=500
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 08:34 AM
тАО04-24-2009 08:34 AM
Re: Shell history not being written to specified history file
I made the changes in my /home .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 08:45 AM
тАО04-24-2009 08:45 AM
Re: Shell history not being written to specified history file
Sorry - I did not read the original posting thoroughly.
If you have logged logged out and back in again it should be working.
The variable is not set in the /etc/profile with a "readonly" against it, which would prevent it from being amended ?
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 10:07 AM
тАО04-24-2009 10:07 AM
Re: Shell history not being written to specified history file
There's no reference to HISTFILE or any history in /etc/profile.
I agree that this should work, but can't figure out why it's not!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 10:15 AM
тАО04-24-2009 10:15 AM
Re: Shell history not being written to specified history file
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 12:32 PM
тАО04-24-2009 12:32 PM
Re: Shell history not being written to specified history file
Where are you defining HISTFILE? Near the top of your .profile?
I also use:
set -o nolog # don't save functions in history file