Tag Info

New answers tagged

1

sudo apt-get install sysstat man pidstat Of possible additional interest, man sar, man mpstat


1

Set the location explicitly in your /etc/openvpn/server.conf: log-append /var/log/openvpn.log Otherwise the output will go to the syslog.


1

Figured it out :) :) :) The problem was the missing --noconsole option. The console of the Minecraft server is on per default and got some commands that it shouldn't get, then it replied "<" everytime and this output was piped into the logfile constantly. Now my upstart script looks like this and it works fine: start on runlevel [2345] stop on runlevel ...


1

Here is a sample script that does what you describe #!/bin/sh FILENAME=$1 LINES=$(cat "$FILENAME" |wc | awk '{print $1}') MAXLINE="8000" DATE=$(date +'%Y-%m-%d') BACKUP_PATH="/path/to/files/" do_backup(){ tar xvf ""backup_$DATE.tar"" "$BACKUP_PATH" } if [ "$LINES" -gt "$MAXLINE" ]; then do_backup fi First it declares som variables, ...


4

This script will get the line numbers, then if it is more than 7999 (greater than or equal to 8000) it will make a .tar.gz of the file. #! /bin/bash lif=$(wc -l < /home/USER/path/to/file.txt) if [ "$lif" -gt 7999 ]; then tar /home/USER/path/to/where/you/want/the/backup/to/be/filename-$(date +%Y-%m-%d-%H:%M).tar.gz /home/USER/path/to/file.txt ...


1

No. For apt-get the one installing applications was the user root since he's the only one that can write on the entire filesystem. You must check instead the auth.log file for the specific users that ran apt-get using sudo. If they use sudo to login as root, then there's nothing much you can do.


0

You can begin by checking /var/log/auth* logs. Also look at this link for possible reasons.



Top 50 recent answers are included