New answers tagged

0

You can use a wrapper around you sftp-server executable as such : ` #!/bin/sh # sftpd wrapper script for executing pre/post session actions # pre session actions and logging here SOURCE_IP=${SSH_CLIENT%% *} MSG_SESSION_START="user $LOGNAME session start from $SOURCE_IP" logger -p local5.notice -t sftpd-wrapper -i "$MSG_SESSION_START" # start actual ...


0

Same issue happened and resolved on Ubuntu 14.04 server with below change in /etc/logrotate.d/rsyslog from: /var/log/syslog { rotate 7 daily ... postrotate reload rsyslog >/dev/null 2>&1 || true endscript } to this: { rotate 7 daily ... postrotate service rsyslog rotate >/dev/null ...


0

An other solution with netcat : echo -n "test message" | nc -4u -w1 <host> <udp port>


4

watch will by default clear the screen each time it prints to stdout. So I would suggest you use a while loop with a delay. Then you could use script command or tee to log the output. For instance, while [ 1 ]; do df ; sleep 0.25; done | tee -a MY_FILE It both will be displayed on the screen and will go to file, appending each run of the command


5

You really don't want to do that. watch is designed to be, um, watched. Its output is formatted in such a way as to make redirecting it impractical. While you can actually do it using something like tee, the output will be many blank lines and very little useful information. So, in the specific case of watch, you're better off writing your own little ...



Top 50 recent answers are included