Category "linux"

weird visual studio to linux results

I have this project where we have to convert a made up simple coding language given through a txt into a c++ language and currently I am having a problem with c

Multiple process curl command for urls to output to individual files

I am attempting to curl multiple urls in a bash command. Eventually I will be curling a large number of Urls so I am using xargs to use multiple processes to sp

Snort3 docker container cannot start DAQ with "permission denied" on interface

I have installed snort3 via the official docker container. When I use docker cp to copy in pcap files snort scans the pcaps just fine. However, when running IDS

Send email using mail or mailx or sendmail containing two different html files - One as body and other as attachment - in RHEL 6.10

I am trying to send an email from linux machine to my Team's DL. The email should contain one html file as an attachment and one html file as a body. I am using

Cross-platform method to detect whether /dev/tty is available & functional

I have a bash script from which I want to access /dev/tty, but only when it's available. When it's not available (in my case: when running my script in GitHub A

How to stop the execution of a running code in x11

I have a program that draws on a x11 window and I'd like to quit it as soon as I press any key. With the code I have, I cannot stop the program with a keypress

Linux ffmpeg utomatic encoder selection failed for output stream

I'm having an issue with doing basically anything in ffmpeg. When I input basic ffmpeg -i filename.mp4 filename.mp3 or ffmpeg -i video.mp4 -b:a 192K -vn music.m

Compilation Failing for xalan-c in Ubuntu

I am trying to build xalan-c (version 1.12) with icu in Ubuntu but it fails. Could anyone help me with this. Environment : Ubuntu 20.04 Steps to reproduce : Cl

generate random number and fill them in array

i want to generate 10 random number between 1 and 100 and store them in an array #!/bin/bash for ((i=0; i<10; i++)) do done

Kubernetes nfs-subdir-external-provisioner stuck in ContainerCreating / Unable to attach or mount volumes: unmounted volumes=[nfs-client-root]

I'm trying to install a nfs-client-provisioner and run a mongdb with it. Unfortunately, the nfs-client-provisioner hangs in ContainerCreating and says "Warning

How to check if a filesystem supports hard links in linux?

What's going on here is I have a construct that goes something like this: if (link(source, intermediate)) { if (pathconf(dirname(source), _PC_LI

Complex keyboard input to child process in C, Linux

Ive been trying to solve this one for some time but im unable to come up with a solution. I need a child process to understand complex WASD keyboard input (with

CentOS 7 Samba Server - Integrate with Windows AD

I am deploying Samba Server on CentOS 7 using winbind. And I am joining AD using #net join ads but i am getting below error. But i am able to login domain users

Command in dockerfile doesn't take effect

Below is my dockerfile. After the dependencies are installed, I want to delete a specific binary (ffmpeg) from the node_modules folder on the container, and the

Vscode cannot connect to remote Linux (_WebSocket close with status code 1006)

Remote connection to Linux. After entering the password, there are two prompts on the right coude not fetch remote environment failed to connect to the remote e

Python Upgrading leads to terminal... not opening

I just upgraded python in ubuntu to python 3.10 to use the match/case statements, but now, my terminal won't open. Anywhere. I tired opening it on Visual Studio

How to pass blank parameters to a script called in crontab (Linux)

I am trying to pass a blank parameter using double quotes, "", but it just gets ignored. All parameters after the blank parameter end up in the wrong position i

Why doesn't my multi-process writing program trigger concurrent conflict?

I'm trying to trigger some concurrent conflicts by having several processes writing to the same file, but couldn't: #include <stdio.h> #include <stdlib

Linux script not executing properly after a reboot

I am using a raspberry pi4 with 32bit Raspbian to display some webpages. I have a script to open 2 webpages, one on each monitor. The end of the script selects

using #if to run a function

I'm trying to run the expression _setmode only if I'm using Windows, and setlocale only if I'm using Linux, but I can't manage to make them work with a simple i