- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- bash history line
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
тАО06-04-2009 01:45 AM
тАО06-04-2009 01:45 AM
if anyone can help me out i'd really appreciated. thank you very much
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 01:50 AM
тАО06-04-2009 01:50 AM
SolutionFirst see that history is being collected.
echo $HISTFILE
After you see there is a history you can grep it or cat it or less it or tail it to get the output you want
cp $HISTFILE newfile
Done, editable output.
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
тАО06-04-2009 01:55 AM
тАО06-04-2009 01:55 AM
Re: bash history line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 04:37 AM
тАО06-04-2009 04:37 AM
Re: bash history line
Linux normally doesn't log what commands are run except for the history file (which afaik does not support this action)
What you could do thou is copy out the history file for that user every day. But to make sure you get just that current days history you'd have to clear the history file every time you copy it.
This would be a bother for the users since the histfile is what makes it possible to use up-arrow.
There probably are methods of doing this but if you have alot of history files then this could be damaging to performance.
Just of the top of my head I would say a cronjob that runs every minute that reads all the history files for new entries (this is a bit tricky thou) and either fixes a date via 'date' command or insert into a database with a timestamp column.
Best regards
Fredrik Eriksson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 05:32 AM
тАО06-04-2009 05:32 AM
Re: bash history line
gets you timestamps into $HISTFILE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 06:00 AM
тАО06-04-2009 06:00 AM
Re: bash history line
Best regards
Fredrik Eriksson