Collect all kinds of linux programming exceptions and fault solutions.


Error while compiling wifi drivers for OpenWrt on Fedora

I'm trying to compile drivers from:
https://askubuntu.com/questions/630198/cant-compile-drivers-for-rt8188eu-wifi-card
(from that repository: https://github.com/lwfinger/rtlwifi_new.git)
not for ...


Why doesn't tcpdump run in background?

I logged in a virtual machine via ssh and I tried to run a script in background, the script is shown below:
#!/bin/bash
APP_NAME=`basename $0`
CFG_FILE=$1
. $CFG_FILE #just some variables
CMD=$2


How can I produce a situation when $EUID is different than $UID?

It might be a silly question but I am not understanding EUID and UID correctly.
The description of real ID and effective ID is clear and I get it. Based on what I have found on Google and ebooks, w...


How can I modify a .UPT file (which is an update file for a Linux based MP3 Player)?

I have recently bought the Hidiz AP80 (which is Linux based). They offer a firmware update, for newer versions. My question is: if I want to modify the contents in this file, how do I?
I actually


How do I take an NFS file handle, and derive its fully-qualified path and extract the attributes of the file?

This started as a more general question in r/linux_programming, but seeing no responses there I want to ask a more basic question.
Once I have an NFS file handle (for the sake of discussion say I've


Changing machine name in ORACLE SQL

I'm new to SQL development. While trying to access remote databases at work I often don't get access because my machine name is odd. I want it to copy my computer's name, but instead it looks like ...


how do I run multiple executables code at the same time using bash?

I'm trying to run multiple c code at the same time using bash but don't know how ?
This code works but it runs one code and then waits until it finishes running to run the next one.
I'd like to run...


How to use a GPIO driver to control pins from a different device's driver?

I am experimenting with linux device drivers. I'm attempting to build an OV2680 driver for my laptop, a Lenovo Miix 510. On that platform the sensor sits behind an INT3472 PMIC, and accessing the d...


How to install awesomewm-git on ubuntu

I want to install awesomewm on ubuntu but there are a lot of dependencies for it. I have to search for each dependency on google and still can't find it. Is there a easy way to install the awesomew...


linux install to a different dir and configure postgresql over/in-paralell with the system0installed postgresql

My built-in system Postgres is Postgres 9.6
I have installed the latest Postgres 12.3 into a different folder /sharefolder/postgre-12.3 using the instructions here
https://www.postgresql.org/docs/c...


Linux drawing to display without desktop manager

Lets say i have a Linux (Ubuntu), well NVIDIA packaged one that comes with Jetson boards, and i have HDMI output and DP.
The goal is to: Display Desktop part via HDMI, and display GUI that i made w...


Clickable Hyperlink in Linux Terminal

How to echo/print a URL that we can click and open from web browser by using shell script and runs on Linux terminal.


Will linux discard multicast packets that are not in the same subnet?

I want to build an overlay network through VXLAN multicast to achieve communication between virtual machines, but I found that multicast packets can only be transmitted on the same subnet. In order...


would like to tar files ending with same timestamp in to a single tar

I got a list of log files and all these files end with a timestamp.
For each day I have bunch of log files all ending with same timestamp
For a week I have long list of file all with time stamps.
The


Processor | Configuration Error | Asserted Error

Ipmitool log is showing "Processor | Configuration Error | Asserted" after server restart itself.
what could be root cause of this? I have try to search about this error but got a few res...


replace string in a text file with the occurence of string

I am trying to form a long index file of the format:
[1]
13 14 15 16 17 18
[2]
89 90 91 92 93 94
[3]
165 166 167 168 169 170
[4]
---------------------
and I have the file in the format:
[index-i]
...


operation on variable with date generate error

How I can minus 30 minutes from variable?
#!/bin/bash
date_30=$(date --date '-30 min')
date_60=$($date_30 --date '-30 min')

exit 0
but I get
./a.sh: 4: ./a.sh: Thu: not found


bash outputting log lines or parts of lines in color

I am using Mac terminal, ssh to a bash account on Linux
I already have the following applying color to my command line prompt:
#bash_profile
parse_git_branch() {
git branch 2> /dev/null | s...


NGINX docker container cannot be accessed in the web browser

I have deployed this docker container.
docker container run -d -p 8080:80 --name my-nginx2 --network my-net nginx:latest
When I do a curl localhost:8080, I am able to access it. However, when I t...


Linux service install on Amazon linux bootstrap

TLDR: How to install/configure/start Linux services (like apache httpd) with the help of bootstrap script those are included as part of EC2 instance User Data.
Background: I am in process of settin...


Chmod is not working on ntfs-3g partition

my chmod doesn't work properly.
I just reinstalled my manjaro distro (formated only the root, non the /home).
This folder resides on a ntfs partition (I already have ntfs-3g installed), I only need...


How to decide Zookeeper's snapshot file policy?

ZooKeeper server creates snapshot and log files, but never deletes them. So we need to care about the retention policy. How to decide on the right amount of remaining ZooKeeper snapshot files?
Need...


socket descriptor per thread

As I understand, in Linux (not sure about Unix in general) there exists a single table of file descriptors per process, and the table is shared among all threads.
So, does this mean that any socke...


ChubaoFS: Nohup command returns error readFromProcess

I'm setting up and running ChubaoFS cfs-server using JSON configuration but when I run nohup ./cfs-server -c master.json > nohup.out & i receive the following error in nohup.out file.
Server


using asterisk in a variable as extension in bash

I want to define a variable that contain asterisk(*), like this
var=*.fits
The asterisk.fits is not the name of my file, but is name of some files with fits extension.
actually I want to define this


Only one GPU us shown in nvidia-smi on Ubuntu

System details:
CPU: Xeon E5620
OS: Ubuntu 20.04.1 LTS
GPU1: Quadro K600/PCIe/SSE2
GPU2: Tesla K40m
lspci | grep "NVIDIA"
0f:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Q...


Kali Linux + Windows-To-Go on same USB Multiboot?

I just bought a Patriot 256GB USB. I want to run Kali Linux (with encrypted persistence) and Windows To Go (Server 2019 or Windows 10.) I've used YUMI and Sardu for multiple Linux Live USB and


Raspberry-pi docker error: standard_init_linux.go:178: exec user process caused "exec format error"

I've installed docker in rapsbian according to the official instructions (i.e., running curl -sSL https://get.docker.com | sh) but I'm not able to run the hello-world example (I've also tried other


grub menu how to exit

How to exit from gnu grub ? Have tried c command line and entered exit. Didnt work


Emulate synchronous serial port on linux

Is it possible to emulate synchronous serial port on Linux?
I need to receive data from cisco serial port via Ethernet port.
Any help would appreciated.


golang cgo - Using linux to cross compile a shared object for darwin

The following post details how to use Ubuntu/Linux to cross-compiile a golang c-shared object for Windows:
Trouble compiling Windows DLL using Golang 1.10
The solution seems to just ensure that min...


Login prompt is not output correctly, thus not able to log into Linux through ttyS0

My system is a intel Atom based board without a vedio card, communication can be carried out through serial port(at baut rate of 115200) and ethernet port. I installed CentOS through PXE, after


How to pass multiple inputs in command-line?

I am trying to execute a command that merges chromosome data. As I need to merge data from chromosomes 1..22 and X and Y, I wanted to see if there is a better way to do this. I can provide myfile.l...


osslsigncode throws error "Unrecognized file type: initrd.img"

I am trying to sign my bzImage and initrd for secure boot. I am able to sign the bzImage using the osslsigncode, but when I sign the initrd.img, I am presented with the following error :
Unrecognized


syntax error near unexpected token `newline' /var/www/html/index.html: line 1: `<html>'

I am using amazon web services (AWS) Linux instance and typed this command as suggested on my course of hacking and patching
/var/www/html/index.html
When I press enter after this I get this error
...


Apache dynamic ProxyPass with Port via URL

I would like to pass any traffic coming to Apache by a specific URL to a specific port via ProxyPass. This is the idea which works, but I would like to set this up dynamically based on the given po...


Mounting remote directories with the same names (Centos)

I've tried sshfs, but it seems it supports only directories that have different names?
I want to achieve the following and can't seem to find a solution:
(server 1) (server 2) (server 1 a...


Can I use variable as the comparison operator?

I want to use a variable as comparison operator. Is it possible? Something like:
x=10
y=20
t="<"
res=`expr $x $y $t`
or
x=10
y=20
t="-lt"
if [ $x $y $t ]; then
..
fi


Eval not showing correct date format in bash script

This is my script
#!/bin/bash
EXPIRYTIME=30
dateformat=(date -d \"+ $EXPIRYTIME minutes\" +"%Y-%m-%dT%H-%M-%S+00:00")
#dateformat=(date + "%Y-%m-%dT%H-%M-%S+00:00")
ex...


Linux | grep date informat "Aug 14"

I am writing a script where I need to do ls -l and grep files of today's date in "Aug 14" format. I assigned the date in a variable as dt=date "+%b %d" but I am not able to get ...


How to practice client server control in this case?

I am completely new to Linux.
But after learning some basics now I plan to practice connecting a server using telnet or SSH.
I have a Windows computer and have Virtual Box to use for Linux Ubuntu.
...


sed replace (assistance required)

I have one file at /var/www/html/daloradius/library/daloradius.conf.php
which have the below-mentioned lines :
$configValues['CONFIG_DB_PORT'] = '3306'
$configValues['CONFIG_DB_USER'] = 'root'
I w...


Ubuntu 20.04, HP ProBook 445 G7 4700U gpu not loading

I've already seen this topic but not sure it makes sense to post an 'answer' with a question.
I have an HP ProBook 445 G7 Laptop with the 4700U and can't for the life of me isolate how to get the g...


Is it possible to SSH every minute for 24/7?

I'm running a cronjob every minute to SSH to a different Linux based device to execute some bash commands to retrieve some data. I am wondering whether if this would cause any issue?
Because after ...


Simple SIP call receiver and recorder

Any linux library or docker container for:
receiving simultaneous voip SIP calls, and for each call,
recording the incoming audio stream to a distinct file,
having silence as outgoing audio stream.


Is there a convenient way of installing a pack of coding-related software for my stack?

After each reinstallation of my Linux Mint distro, I have to install a bunch of software needed for development under my stack - mean (MongoDB,Express.js,Angular,Node.js). I would like to do it qui...


how can i loop through the coming frequency of the keyword

---- my text file from which i have to search for the keywords [name of the file --- test]
centos is my bro
red hat is my course
ubuntu is my OS
fqdn is stupid
tom outsmart


is select() blocking or non-blocking call

Is it fair to say that select() is non-blocking when it passes struct timeval argument with timeout value? And when that argument is NULL, it is blocking.


slurm job name in a for loop

I would like to have my job name function of the parameters of the loop.
#!/bin/bash
#SBATCH -n 4
#SBATCH -p batch576
MAXLEVEL=8
process_id=$!
for Oh in '0.0001' '0.0005'
do
for H in '1.' '0.8...


If Crontab is set to run a script at the Nth minute of each hour and the computer boots within that Nth minute, will the script run?

If Crontab is set to run a script at every 0th minute of the hour and the system boots within that 0th minute, will the script run?
For example, if crontab is set to run at minute 3 of each hour an...


Next