Category "linux"

How do I deal with a filename that starts with the hyphen (-) character?

Somehow, at some point, I accidentally created a file in my home directory named '-s'. It is about 500 kb and I have no idea if it contains important data or no

Watch changes in a file and restart python script

I want to restart a python script(restart.py) whenever some edits a file (test.txt) =====restart.py==== from time import sleep for i in range (1000): print

While building GCC 8.5.0: "error: `CC' has changed since the previous run"

I'm building GCC 8.5.0 on a Devuan Chimaera GNU/Linux system (using GCC 10). I've configured with ./configure --disable-gnat, then ran make. At some point, I ge

Comparing latency of mutex vs. spinlock wake time

I am curious about the latency of a mutex vs. spinlock, measured as the time between when one thread unlocks it and another waiting thread can access it. I wrot

How to include multiple values under a section in inifile

I am trying to create a puppet manifest using inifile. This would be for a configuration file where I need to have the following format. [safe] directory =

OpenCV output monochrome TIFF group 4 compression

Is there a way to output monochrome TIFF files in OpenCV with group 4 compression? This is the command to do it with imagemagick/graphicsmagick 'gm convert '.$f

Can Valgrind mend memory corruption?

I am testing a C++ program for problems. I am running it under valgrind. I start the program with // valgrind test char * p = (char*)malloc(4);

display all blocked and pending signals at one time

The following program checks if a signal is pending. I use the sigpending function to return blocked (or waiting) signals. The problem is that I don't want this

Docker Openvpn network forward doesn't work

I would like to connect from a php docker, through a OpenVPN docker to a OpenVPN client. Network structure I have added a Docker network (192.168.200.0/24) The

How do I test and / or benchmark traditional Linux Kernel vs Linux Kernel with RT Preempt patch?

I am working on a project to contrast and observe the performance gain with Preempt RT patch for Linux. What kind of C programs should I look to execute on the

Installing RTSP Server Python bindings on Linux

I am trying to install Python bindings of RTSP Server on my Linux camera. I have working Gstreamer, opencv. When I try installing the below, I get the following

Trap and exit big shell script with background processes

I have 2 shell scripts that contain ffmpeg commands (command1.sh and command2.sh). command2.sh has like 500 ffmpeg commands that trigger one after another with

How to run npm start without opening browser for react development on linux

I am learning react and find myself running npm start on the terminal a couple of times but its annoying how it opens a new browser window everytime. I'm tryin

Cannot debug C# tests with visual studio code on linux

I have a c# project which I want to unit test. I'm trying to simply debug a unit test in VSCode running on linux, but I get the following error: Failed to start

Is there a way to log (additional) keystroke information on a Cowrie honeypot?

For a thesis project, I have set up a Cowrie honeypot within an Azure VM running Debian. I am interested in, in addition to the regular logs, extracting specifi

Mysql: can't start mysqld "mysqld.service: control process exited, code=exited status=1"

I have installed a third party framework fate, and mysql has been installed inside this framework, at the following path: /data/projects/fate/common/mysql/mysql

No output in the parent process without fflush(stdout)

I'm trying to understand what is behind this behaviour in my parent process. Basically, I create a child process and connect its stdout to my pipe. The parent p

Use of function kmem_cache_shrink() in slab allocation

While going through the slab allocation mechanism, I came across the following function. int kmem_cache_shrink (struct kmem_cache *) The description of this fu

Libadwaita on windows 10 & 11

I am new to GTK development. I started using GTK4 and it is really grea. As far as I understand libadwaita is used for reflecting dynamic system changes of colo

If I pull every 1 minute with a script on my linux server from Github, will I be banned? [closed]

I have two repos on Gitee and Github, and I want to use my personal server on linux to sync them. What I've done is to pull every 1 minute fro