HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to save over 1000 commands in .sh_history & no...
Operating System - HP-UX
1829102
Members
2584
Online
109986
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
Go to solution
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
02-24-2005 08:58 AM
02-24-2005 08:58 AM
My root's .sh_history does not save too many commands even though HISTSIZE=64000. Gets overwritten after few hundred commands ?
Why ?
See below:
#/root ==> cat .sh*|wc -l
206
root's .profile
===============
HISTFILE=/root/.sh_history ; export HISTFILE
print -s "LOGIN - `date '+%m-%d-%E-%H:%M'`"
HISTSIZE=64000 ; export HISTSIZE
ENV=/root/.kshrc; export ENV
EDITOR=vi
export EDITOR
set -o vi
Why ?
See below:
#/root ==> cat .sh*|wc -l
206
root's .profile
===============
HISTFILE=/root/.sh_history ; export HISTFILE
print -s "LOGIN - `date '+%m-%d-%E-%H:%M'`"
HISTSIZE=64000 ; export HISTSIZE
ENV=/root/.kshrc; export ENV
EDITOR=vi
export EDITOR
set -o vi
good judgement comes from experience and experience comes from bad judgement.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 09:19 AM
02-24-2005 09:19 AM
Solution
The usual suscpects in such a case are cron jobs that erase the HISTFILE
I set my size to 5000 and get hundreds of commands.
I would do a crontab -l and start looking for suspects or
find / -exec grep -l 'sh_history' {} \;
That should identify any scripts that are hammering the file.
SEP
I set my size to 5000 and get hundreds of commands.
I would do a crontab -l and start looking for suspects or
find / -exec grep -l 'sh_history' {} \;
That should identify any scripts that are hammering the file.
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
12-16-2005 06:18 AM
12-16-2005 06:18 AM
Re: how to save over 1000 commands in .sh_history & not overwrite ?
It is the print command doing the hammering .Thansk steve.
good judgement comes from experience and experience comes from bad judgement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 06:56 AM
12-16-2005 06:56 AM
Re: how to save over 1000 commands in .sh_history & not overwrite ?
no response needed.thanks
good judgement comes from experience and experience comes from bad judgement.
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