Skip to content
Advertisement

Filter followed tail to file using grep and redirect

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

“/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

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

Advertisement