- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: history record
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
тАО08-14-2006 12:48 PM
тАО08-14-2006 12:48 PM
history record
I want to record in the system all users' operation, how do I need to do? Thanksя╝Б
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2006 02:05 PM
тАО08-14-2006 02:05 PM
Re: history record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2006 02:56 PM
тАО08-14-2006 02:56 PM
Re: history record
export HISTSIZE=3000
HISTSIZE 3000 will record the last 3000 commands of the user. Default is about 100. To search type in 'history'. I.e.,
history -1000 | grep -i command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2006 09:55 PM
тАО08-14-2006 09:55 PM
Re: history record
you can define $HISTFILE variable in user profile file too.
For example:
export HISTFILE=/root/users_history/$USER.log
export HISTSIZE=900000000
and don't forget to set right permission for /root/users_history/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2006 11:31 PM
тАО08-14-2006 11:31 PM
Re: history record
Under sh-posix and ksh, command history is saved to ~/.sh_history by default. To see the complete history for all users:
# more /home/*/.sh_history
To see the last ten commands entered by all users:
# find /home -name .sh_history -exec tail -n 10 {} \;
Set $HISTSIZE=5000 in each user's ~/.profile to keep a large command history for each user.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2006 12:33 AM
тАО08-15-2006 12:33 AM
Re: history record
Though if you convert to a trusted system, you can turn on auditing.
With .sh_history - users can delete it whenever they like.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2006 01:46 AM
тАО08-15-2006 01:46 AM
Re: history record
Read up on the 'script' command, which makes a typescript of everything on the terminal. You could add the following to /etc/profile:
# script -a /tmp/scr-$(whoami).log
If you modify your users' $PS1 prompt to display the current date/time, items in your typescript will be timestamped.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2006 01:49 AM
тАО08-15-2006 01:49 AM
Re: history record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2009 09:01 AM
тАО01-08-2009 09:01 AM