Tag Info

New answers tagged

2

For any configuration file for which apt has posed a question, apt will keep a backup based on the action you took. If you chose to replace the current file with the package file, the original will be saved with the extension dpkg-old. If you chose to keep the current file, the new one from the package will be kept with the extension dpkg-dist. ...


1

What you need is a mechanism called flushing: forcing a process to write its output, which would otherwise remain buffered until completion. Shell scripts flush on a line by line basis. If you need the output of a shell script before the script is ended, make sure it contains a newline. Python programs can explicitly flush their stdout by calling the flush ...


0

If you are trying to output both STDERR and STDOUT of every command run to a file, you can use >> $logfile &> Example: #!/bin/bash <command> <arguments> >> $LOGFILE &> <command> <arguments> >> $LOGFILE &> In this example, a logfile will be created with the value you set the LOGFILE variable ...


1

If you want to clear all your log files, not just those in the first-level log folder, you could use: shopt -s globstar # if needed truncate -s 0 /var/log/*.log # first-level logs truncate -s 0 /var/log/**/*.log # nested folders, like /var/log/nginx/access.log Noting that if you already have logrotate running, you'll need to ...


0

Read man rsyslog.conf, and inspect /etc/rsyslog.conf, /etc/rsyslog.d/*. In /etc/rsyslog.d/50-default.conf you will see: # First some standard log files. Log by facility. # auth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none -/var/log/syslog which shows that /var/log/auth.log and /var/log/syslog do NOT get the same ...


0

A program like htop is a custom program developed in C language. It uses the ncurses library which allows the program to manage its output in a terminal, some sort of pseudo GUI. To get the same effect, a program needs to be written using ncurses.


0

You can also direct the output of the individual cronjobs to their own logs for better readability, you will just need to append the output of date somewhere. 0 15 * * * /home/andrew/daily-backup.sh >> /var/log/cyphertite.log



Top 50 recent answers are included