Sponsored Content
Full Discussion: HP-UX history settings
Operating Systems HP-UX HP-UX history settings Post 302581505 by vbe on Tuesday 13th of December 2011 09:47:46 AM
Old 12-13-2011
Here is just a little extract of mine:
Code:
ant:/home/vbe $ wc -l .sh_history
1324 .sh_history
ant:/home/vbe $ head .sh_*
LOGIN - 10-14-2011-17:37
  then
    GRPID=$1
    grep "^$GRPID" /etc/group|cut -d: -f3
ant:/home/vbe $ grep HIST .profile
HISTFILE=$HOME/.sh_history
HISTSIZE=18432
export HISTFILE HISTSIZE
ant:/home/vbe $ grep HIST .kshrc
ant:/home/vbe $ grep LOGIN .sh_*|wc -l
95

As you can see I have included in my .profile a line to write a "LOGIN " with date in my .sh_history to help me when I go through looking what silly things I could have typed or "I already been through this.." using the date to point me in the history.
If your wish is to flush, I suppose there are enough customization tips out on the net to search and I find that not all that wise and rather preferring to limit the size if needed, it can happen that it get corrupted (especially when big ) depending of what you have in your environment (.kshrc stuff, mine is almost 100 lines...) and so I being a little paranoid keep all when possible: I regularly reset .sh_history after saving the previous as .hist.vbe.<last-date-of-use> e.g:
Code:
ant:/home/vbe $ ll .hist.*      
-rw-r-----   1 vbe        bin         105230 Jun  3  2004 .hist.040603
-rw-------   1 vbe        bin           6928 Sep 21  2004 .hist.040921
-rw-------   1 vbe        bin          20924 Nov  8  2004 .hist.041108
-rw-------   1 vbe        bin          80048 Feb 25  2005 .hist.050225
-rw-------   1 vbe        bin         111570 Apr 25  2005 .hist.050424
-rw-------   1 vbe        bin         119080 May  3  2005 .hist.050503_important_utmp
-rw-------   1 vbe        bin         129466 May 25  2005 .hist.050524
-rw-------   1 vbe        bin         151444 Jun 14  2005 .hist.050614
-rw-------   1 vbe        bin         201640 Aug 25  2005 .hist.050825
-rw-------   1 vbe        bin         214200 Aug 31  2005 .hist.050831
-rw-------   1 vbe        bin         257188 Jan 16  2006 .hist.060115
-rw-------   1 vbe        bin         255804 Jan 24  2006 .hist.060124
-rw-------   1 vbe        bin         112040 Jul  7  2006 .hist.060707
-rw-------   1 vbe        bin          23350 Sep 11  2006 .hist.060911
-rw-------   1 vbe        bin          38371 Sep 22  2006 .hist.060921
-rw-------   1 vbe        bin          38096 Oct 11  2006 .hist.061011
-rw-------   1 vbe        bin         128874 Jun 22  2007 .hist.070622
-rw-------   1 vbe        bin         194172 Oct 18  2007 .hist.071018
-rw-------   1 vbe        bin           9386 Dec  5  2007 .hist.071205
-rw-------   1 vbe        bin          94076 May 13  2008 .hist.080513
-rw-------   1 vbe        bin         101366 May 16  2008 .hist.080516
-rw-------   1 vbe        bin         103430 Mar 26  2009 .hist.090326
-rwx------   1 vbe        bin         122562 Sep 28  2009 .hist.090928
-rwx------   1 vbe        ocirt        83776 Apr 23  2010 .hist.100423
-rwx------   1 vbe        ocirt       140038 Sep 10  2010 .hist.100910
-rwx------   1 vbe        ocirt       230816 Apr  7  2011 .hist.110406
-rwx------   1 vbe        ocirt       305684 Aug 12 15:44 .hist.110812
-rwx------   1 vbe        ocirt       327478 Aug 25 15:58 .hist.110825
-rwx------   1 vbe        ocirt       342056 Sep  1 15:43 .hist.110901
-rwx------   1 vbe        ocirt       381352 Oct 11 10:11 .hist.111011
-rwx------   1 vbe        ocirt       357726 Oct 14 14:31 .hist.111014

Since you ask where else can we find what command were passed, except if user used script command before, there are no ways of knowing unless you, you have put something in place ( I have... but you know I am a bit paranoid...). If you ask, I believe you have good reasons, and I then understand your feelings, yes there are "guilty" users that erase all their activity on logout so when you ask "who has been and modified..." they join the "not me" chorus (explaining my paranoid attitude...) so you being responsible get the blame and your boss couldn't care less when you reply but all the system engineers and sysadm have the root passwd/access...
A few tips:
when strong suspicion, copy as root (using cron? the .profiles and .sh_*of the users you want to have an eye on - and root -very important!) in a place where root only has access (use user/group bin and put yourself in it and perm 770 ).
you can always try to use your backup software to see (can be very helpful some times)
etc..
 

8 More Discussions You Might Find Interesting

1. Solaris

Duplex Settings

Hi All I've been having a lot of errors logged on the Cisco Catalyst (4000 series) which one of my Solaris servers is patched into. I have a feeling they are duplex related, but I'm a bit stuck as to how to confirm that. How do I: 1. Check the duplex settings on my eri0 card? 2. Set the... (3 Replies)
Discussion started by: saabir
3 Replies

2. UNIX for Dummies Questions & Answers

Network settings

Total newbie here!! How do I view and alter network settings (ip address, subnet mask and default gateway) in UNIX? Thanks in advance.. (3 Replies)
Discussion started by: ZappaDub
3 Replies

3. Linux

Ip settings

Hi, How to set ip address in linux. Regards, Guguli (1 Reply)
Discussion started by: guguli
1 Replies

4. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

5. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

6. UNIX for Dummies Questions & Answers

The history command: See other users command history

Can anyone tell this: If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used. Thanks in advance for your help. Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

7. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

8. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies
All times are GMT -4. The time now is 07:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy