| 
     
       |  |  |  | 
            
              | 
             
               | 
               
                 |  | UGU: Unix Guru Universe - Unix Tip #4326- January 14, 2025
 -  Home : Help
 : Today's Tip Unix Tip #4326- January 14, 2025
 
 
TRACKING OF LOGINS AND LOGOUTS 
 In the .login file add the commands:
 ------------------------------------
 
 echo login time `date` >> .daylogs/masterlog
 
 grep -i "sun" .daylogs/masterlog > .daylogs/sunday.log
 grep -i "mon" .daylogs/masterlog > .daylogs/monday.log
 grep -i "tue" .daylogs/masterlog > .daylogs/tuesday.log
 grep -i "wen" .daylogs/masterlog > .daylogs/wensday.log
 grep -i "thu" .daylogs/masterlog > .daylogs/thursday.log
 grep -i "fri" .daylogs/masterlog > .daylogs/friday.log
 grep -i "sat" .daylogs/masterlog > .daylogs/saturday.log
 
 
 In the .logout file add this line
 -----------------------------------
 
 echo logout time `date`>> .daylogs/masterlog
 
 This script assumes you have a hidden
 directory called .daylogs this helps keep it
 out of sight and away from prying eyes and
 if you keep root ownership of the directory
 change the mode to:
 
 chmod 744 .daylogs
 
 This will not allow anyone to get in to the
 directory to look around.
 
 
 NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.
 
 LAST 5 TIPS
 4325
 - IRIX: CHECK FOR NEW CONFIGS
 4324
 - OPERATING ON MULTIPLE FILES
 4323
 - I SED BLANK
 4322
 - FILES OPENED BY A PROCESS
 4321
 - BACKUP THE REMOTE ESSENTIALS
 I want to 
 SUBSCRIBE
 and get a UGU Tip everyday.
 I want to 
 UNSUBSCRIBE
 and NOT get a UGU Tip everyday.
 If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
 |  |  
                 |  |  
                 |   Copyright 1994-2024 Unix Guru Universe 
 |  |  |  |  |