Hot answers tagged

6

$ cat tst.awk BEGIN { beg = "[BEGINX]" mid = "[First-string-i-search-for]" end = "[ENDX]" } index($0,beg) { gotBeg = 1 gotMid = 0 buf = "" } gotBeg { buf = buf $0 ORS if ( index($0,mid) ) { gotMid = 1 } if ( index($0,end) ) { if ( gotMid ) { printf &...


2

Inside a docker container, Nextcloud will usually write its logs to stdout. You can check the logs using docker logs command. docker logs --follow CONTAINER where CONTAINER is your Nextcloud's container name or ID (find out with docker ps). Docker also captures the logs and saves it to a json file with additional information (timestamp, etc). You can find ...


1

I found it by installing locate: sudo apt install locate Then I updated the db: sudo updatedb And the last thing was to locate the file itself: $ locate nextcloud.log /var/lib/docker/volumes/03eae9cea7bb7b1cff1f0095298b17972805c8b47f9eb5314fc2dcef122382b8/_data/data/nextcloud.log /var/lib/docker/volumes/...


1

log-all should be hyphenated and after allow. The correct command is sudo ufw allow log-all proto tcp from x.x.x.x to any port 22 replacing x.x.x.x with the intended IP. Syntax The syntax is documented on the man page. ufw [--dry-run] [rule] [delete] [insert NUM] [prepend] allow|deny|reject|limit [in|out [on INTERFACE]] [log|log-all] [proto PROTOCOL]...


1

I got bitten by this when I tried to configure fail2ban on a "minimal" Ubuntu 20.04 LTS image. On Ubuntu fail2ban looks for authentication events in /var/log/auth.log. However, in the "minimal" image only the systemd "journal" facility is available, the file auth.log is missing and then fail2ban won't start. To get the good old ...


1

Try in /var/log/apache2/nextcloud.log assuming you're using an Apache LAMP stack. You can also set where the logs will be by adding a TransferLog section to your Apache virtual host file usually located in /etc/apache2/sites-available/. Also see this great setup guide which covers most everything: https://wiki.learnlinux.tv/index.php/Nextcloud_-...


1

It went that my computer was broken : two memories sticks and one DIMM support on the motherboard were badly working and had to be removed or disabled. The message : next->prev should be fff f 8e7ab9011680 but was fff b 8e7ab9011680 hinted me to such failure. Because a pointer changing it's value by a single bit and this one being a very high value one, ...


1

I believe it depends on the distro, but on RHEL and Fedora, the file created in your home directory is created during each login, and if it already exists, it is moved to the .old file, overwriting the file if it exists. It is used for the lifetime of the login session and closed when you log out.


1

With GNU grep that support PCRE (Perl-compatible regular expressions): grep -Pzo '.*\[BEGINX\](.|\n)*?\[First-string-i-search-for\](.|\n)*?\[ENDX\].*\n' infile that is: grep -Pzo '.*BEGINNING(.|\n)*?MIDDLE(.|\n)*?END.*\n' infile


Only top voted, non community-wiki answers of a minimum length are eligible