- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: setting font color in history file.
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
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
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
10-02-2013 09:09 AM
10-02-2013 09:09 AM
setting font color in history file.
Hi,
for example when I execute
#lvlnboot -v
#rm -rf /tmp/testdir*
#chown user1:group1 /tmp/testdir
so when I check in history, all 3 commands executed will be updated.
for certain commands ,i need to change the font color.
suppose who ever executes rm -rf ,it should be updated in history file in redcolor.
my sample history file
#lvlnboot -v
#rm -rf /tmp/testdir*
#chown user1:group1 /tmp/testdir
when ever rm -rf is executed,it should be updated in histroy file in red font.
-Madhu
- Tags:
- history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2013 10:27 AM
10-02-2013 10:27 AM
Re: setting font color in history file.
Not really possible. The history file is only a list of commands that have been executed. It's sole intended use was to provide an easy way to go back and recall commands that you previously ran.
It was never intended to be any sort of audit tool and does not have any flexibility to add highlights, dates/times, etc.
Font color will also depend entirely on the terminal emulator you are using. A basic HP terminal specification can do things like blink, bold, reverse video, but no color. And even those are not supported in the history file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2013 12:00 PM
10-02-2013 12:00 PM
Re: setting font color in history file.
Anything is possible but you'll need to write a filter to add the color. Kind of like the various "color" ls(1) commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2013 09:11 AM
10-03-2013 09:11 AM
Re: setting font color in history file.
Hi Dennis,
>>but you'll need to write a filter to add the color. Kind of like the various "color" ls(1) commands.
you mean to say,
everytime all user has to execute something like
$03[] ls
03[]---indicates color font.
-madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2013 12:35 PM
10-03-2013 12:35 PM
Re: setting font color in history file.
> every time all user has to execute something like
Actually something like chistory. :-)
Where chistory is a wrapper around history or fc. You may want to look at the source to cls, to see how to add color.