last

last

Post by boler.. » Sun, 26 Mar 2000 04:00:00



in my redhat 6.1
last does not show telnet records anymore

maybe it is due to deletion of /var/log/wtmpx
I delete /var/log/wtmpx few weeks ago
and touch this file then

how can i re-enable the logs of telnet sessions?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

last

Post by David Efflan » Sun, 26 Mar 2000 04:00:00



>in my redhat 6.1
>last does not show telnet records anymore

>maybe it is due to deletion of /var/log/wtmpx
>I delete /var/log/wtmpx few weeks ago
>and touch this file then

>how can i re-enable the logs of telnet sessions?

You should never delete log files.  Instead you should cp /dev/null to
them.  But why would you delete this file anyway?  The 4 AM daily cron
should clean things up if the files get too big.  You can delete the
backup logs that are followed by a number.

I don't have a wtmpx, but I do have wtmp and backup files like wtmp.1.  As
root:

cd /var/log
touch wtmp
chgrp utmp wtmp  (get the 'u' and 'w' right)

Then ls -l should show wtmp with owner 'root' group 'utmp'

Then you may want to reboot your system because I am not sure what would
need to be restarted for it to work.  Note: I have RH 6.1 (Cartman).

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

 
 
 

1. last character of the last line is a newline?

While helping to make sure the last character of the last line is a
newline, Laura Fairhead, a few years back, suggested the following. I
think it also check if the file is empty:

{cat filename.txt
   if [ "$( tail -c 1 filename.txt |tr -c '\12' x )" = "x" ]
   then echo
   fi

when I try it i get:

%:~/Desktop m1$ {cat filename.txt
-bash: {cat: command not found
%:~/Desktop m1$   if [ "$( tail -c 1 filename.txt |tr -c '\12' x )" = "x" ]
 >   then echo
 >   fi

%:~/Desktop m1$ }
-bash: syntax error near unexpected token `}'
%:~/Desktop m1$

I would like to make a simple function out of it. Where did I go wrong?

2. GNUMake parse error at ;;

3. One last line - one last time

4. Disabling PNP ether cards for FreeBSD 2.2.2.

5. get last char of last positional parameter

6. umask under SCO 5.0

7. Removing last character from last line in a file

8. How to redirect all http requests to https

9. select field n to last? select last field?

10. How do I get last to report last login time.

11. convert first last to F.I. last

12. last.c sources to linux version of last available?

13. How to extract the last part of the path (was: Using 'cut' to extract the *last* field of a string