I want to get the output of tail -f /var/log/apache2/error.log | grep “trace1” into a file. But tail -f /var/log/apache2/error.log | grep “trace1” > output.txt does not work, while the first command gives an output in my terminal window as expected. I guess it has to do with the follow-parameter, because if I omit the “-f”, the output file is
not sure what’s the problem with this “regex” in the “grep” shell command
This was my attempt: I’m on hackerRank. I have this file that is delivered to my stdin. I need as a result lines that contains : Answer In a POSIX BRE pattern, when you use a “shorthand character class” like s, w, even in GNU grep, these escape sequences are treated as separate chars, a backslash and a letter. [D]{1,}
“/usr/bin/ld: cannot find -llibopencv_calib3d” when compiling an opencv project in Ubuntu 20.04
I have installed opencv in Ubuntu 20.04 following the instructions in OpenCV Installation in Linux. As per the instructions, sudo make install copies all the .so files to /usr/local/lib. However, when compiling a program, using the command g++ –std c++17 -g opencv/Basic.cpp -o output -I/usr/local/include/opencv4 -L/usr/local/lib/ -llibopencv_calib3d -llibopencv_core -llibopencv_dnn -llibopencv_features2d -llibopencv_flann -llibopencv_highgui -llibopencv_imgcodecs -llibopencv_imgproc -llibopencv_ml -llibopencv_objdetect -llibopencv_photo -llibopencv_stitching -llibopencv_video -llibopencv_videoio
authentication failed when I use postgresql with django
My environment OS: AWS linux python 3.7 psql (PostgreSQL) 13.3 I am trying to use PostgreSQL with Django. I changed setting.py like below: I created a password for PostgreSQL and I successfully logged in as this user. However, when I tried to execute this: I got this error: pg_hba.conf looked like this first: I changed like this: However, either way
Question about using #define value in if condition and code generation: debug vs release build
Question is related to release and debug build. Something related to this and this But I have a simple doubt for example if I do following: (file is debug-test.c) So my doubt/question is if I do #define debug 0 will compiler eliminate/optimize out all the code (that if condition) from final binary? Or code will remain in final binary as
How to install uidmap package for docker rootless
I am using photonos and it is required that you install uidmap to run docker in rootless mode. Find it strange photonos dosent have this package. is there a reason for this? is photon os secure enough not to require this? If not and it is advised to use docker in rootless mode how do i install uidmap? Thank you
ERROR 1 (HY000) at line 1: (Errcode: 13 “Permission denied”)
I have to save my SQL query output in a text file. When i run the needed query: ..it throws this error: Why does this happen. I am using Ubuntu 20.04. Answer You have no access to directory /root/sql because of secure_file_priv. Please do SHOW VARIABLES LIKE “secure_file_priv”; and see what directory you can use for outfile. This paramater can
Wayland client get compositor name
Is it possible for a c application using libwayland-client.so to get the name of the compositor / display server it opened a connection to (e.g. KWin, Sway, …)? I fail to find it in the docs. For reference, in X11 this is possible using XProps specified by EWMH: _NET_SUPPORTING_WM_CHECK to get the window id of the window manager and then
xsetwacom unable to find output
Xrandr shows two monitors. I want to use xsetwacom to move all devices to HDMI-0 however the xsetwacom command towards the bottom does not recognize HDMI-0 Outputs: So I try to xsetwacom to HDMI-0 After I get this to work I can make a script to do it on startup but I can’t find any resources on how to fix
linux replace string in files recursively
I have a folder which is full of *.java files. it has the following method in it: i wanted to change this as following: I have searched in the forum and found some solutions, replce string is what i wanted so tried the following: But it throwing me the following error: I guess the old_string and new_string formates are the