Questions tagged [linux]

LINUX QUESTIONS MUST BE PROGRAMMING RELATED. Use this tag only if your question relates to programming using Linux APIs or Linux-specific behavior, not just because you happen to run your code on Linux. If you need Linux support you can try https://unix.stackexchange.com or the specific Linux distribution's Stack Exchange site like https://askubuntu.com or https://elementaryos.stackexchange.com/

0
votes
0answers
6 views

Will it fail if linux dd command target device is a little smaller than source?

As I know the linux dd command will dump the data bit by bit. It means user can totally duplicate a device to the other one no matter if it is partition/MBR/loader/data. I believe the total bit ...
0
votes
0answers
13 views

Reading memory of another process in Linux using .Net Core

I'd to ask whether it is possible to read memory of other process while using .NET Core on Linux on Windows I'm using DllImports [DllImport("kernel32.dll")] public static extern IntPtr OpenProcess(...
-1
votes
0answers
10 views

install z3 in a remote linx server control without being root

I am trying to install z3 on a remote server that I am not the root of. I followed the steps to the point where I have this message: Z3 was successfully built. Z3Py scripts can already be executed in ...
0
votes
0answers
13 views

Can't add user to docker group

I'm trying to set docker up on a new system, and when running docker info I get: docker -v => Docker version 18.09.5, build e8ff056 docker info => Got permission denied while trying to connect ...
0
votes
1answer
26 views

When I get a “filesystem is full” error, but “df” shows there is free space, what the problem can be? [on hold]

When I touch a flie, like "touch test.txt", I got a message which showed "no space left on device". touch: cannot touch 'test.txt': no space left on device But when I 'df', it shows Avail is more ...
1
vote
0answers
19 views

How to use Kotlinc coroutine in non android project?

I am new to Kotlin and trying to learn asynchronous programming using coroutine. I am following Kotlin official docs. But when I tried to compile my code, it showed me error: "unresolved reference: ...
0
votes
1answer
19 views

How do i use xargs to create soft links from my html files?

The problem is that I have a directory full of html files. However, when I open the folder in Firefox it is difficult to navigate because when I open the folder there are also all of the associated ...
-3
votes
0answers
7 views

processing fastq files using cellranger on linux

I am trying to perform a cellranger count on fastq files generated from a 10x genomics single cell RNA Seq run. Just to provide some background, I ssh’d into the AWS using our AWS IP with MobaXTerm ...
0
votes
2answers
31 views

Bash script for check pem files certs and send mail if expire

can someone help me to finish a script in bash for check openssl certificates and send mail before expire ? I tried with some code from here, but i don't know exactly how to continue location=/home/...
-2
votes
0answers
22 views

How to merge files in a directory such that 1 million files become 1000 new files, each consisting of 1000 original files?

I have a folder with 1 million (text) files. I want to merge the first 1000 files into a new file called 1. Then the next 1000 files into a new file called 2. And so on. This way I would end up ...
-2
votes
0answers
9 views

how to make a kali linux Oscanner diagnosis

I have an assignment for high school, I must give a report on a utility kali which is called Oscanner. It is not documented well, and in addition I do not speak English (G-trad). I answered most ...
0
votes
0answers
10 views

Reset GPIO state to its default value when app crashes with libgpiod

For a project, I need to design and develop an app that does a few things, among which is GPIO handling. Read/Write to input/output, trigger event on edge etc. There is one specific GPIO, that when ...
-1
votes
0answers
13 views

How to put latest file name into a variable

I have files named john-20190501.txt, john-20190502.txt, john-20190508.txt in folder Kennedy. I am trying code latest_file= ls /Kennedy/ -rt | tail -1 It's printing the latest file but not ...
-1
votes
2answers
37 views

How to get Processor manufacturer ID in QT application using C

Can anybody help me to read the processor manufacturer ID in a Qt application using the C programming language. Here is the code I tried : #include <stdio.h> int main() { system("sudo ...
-1
votes
0answers
17 views

Do I have permission to delete this file? [on hold]

In a DC jump server, the permission settings for folder /share is 1777. My account in that server is sre_newhire. The owner for file /share/oncall_checklist is sre_oncall. Do I have permission to ...
-1
votes
0answers
16 views

How to pass Google Authentication Code in Opne? [on hold]

I am using vpn which is enabled with 2 factor authentication enabled, which means that you need three things to connect to vpn: username, password, and Google authorization code. Since my username ...
0
votes
1answer
13 views

How to get string and string length in linux kernel mode?

I'm actually new to the linux kernel mode programming. I have to get a input from a user mode program test.c, and write it into my driver kernel mydrv.c What i did is get a string input by scanf, and ...
-2
votes
0answers
9 views

What is the best practice for keeping track of the dependent software versions in medium size system

I would like to understand what is the best practice and what are the tools available to keep track of a used software version in the set of linux server. This is a medium size web application and has ...
-1
votes
0answers
16 views

I can't capture SIGPIPE when using send with select

I can't capture SIGPIPE when using send and recv. But I can't capture SIGPIPE when using send/recv with select. what is wrong with my code? // the select will block 10 seconds ret = select(sockfd + 1,...
-2
votes
0answers
13 views

Cannot find screen after executing a long running job [on hold]

I have been using screen command in linux to execute a long running script on my server. I have created a screen as follows: screen -S migration In the new screen I run the script and exited with ...
-1
votes
0answers
29 views

Why fewer processes are created when it's within allowed limits?

I've set hard limit for the number of processes as 20 in /etc/security/limits.conf But howcome only 18 processes are created when I try to create 20? From the screenshot, it says resource is ...
0
votes
0answers
23 views

Getting this error every time while compiling an android kernel :'(

I am trying to compile a stock kernel downloaded from the official website for my android device but getting the following error every time even after making modifications to the makefile scripts/...
0
votes
1answer
29 views

Ant says JAVA_HOME isn't set, but $JAVA_HOME shows up in Bash

I'm attempting to install Java and Netbeans on my Solus Linux laptop. I am currently attempting to get Ant to build, per the NB instructions. Ant throws an error when I run build.sh, though. I have ...
1
vote
1answer
34 views

Python web based interpreter security issues

I am making a web based python interpreter which will take code executes it on Linux based python3 interpreter and give output on the same web page. But this has some serious loop holes like someone ...
0
votes
0answers
19 views

sem_timedwait() does not work for the remote machine

I have written a C++ program for thread synchronization. The program works for my computer, for which the operating system is Ubuntu 16.04. While running the program on the remote machine with Ubuntu ...
0
votes
2answers
22 views

Bash Shell Commands with options

I'm having issues with piping the translate command into the word count command using the shell for an assignment. Using Debian 9 Linux distro. I need to remove colons from the passwd file in the /...
-1
votes
0answers
10 views

List with full path, recursive AND long format

I have a script monitoring directories for changes. What I need is this command ls -lARt /var/www/my-site that outputs with the full path. And it needs to be recursive. Sample Output. drwxrwxr-x 8 ...
-5
votes
0answers
32 views

How to analyze data in .txt [on hold]

Can someone write a python code or linux code for me to analyze the data sheet (.txt file) as follows? What the code can do is: (1) calculate the average and standard deviation of the value ...
-1
votes
2answers
15 views

“Syntax error near unexpected token `crontab'” when trying to add cron job in one line as sudo

I am getting a "-bash: syntax error near unexpected token `crontab'" when I am attempting to write a cron job to crontab in one line. (This is for a launch configuration on EC2.) I am following this ...
5
votes
1answer
52 views

Why does the return from “system” not match the return of the script that was called?

I have a simple script #!/usr/bin/bash # exit5.bash exit 5 And I call it with system in a c program #include <stdlib.h> #include <stdio.h> int main() { int ret = system("./exit5....
0
votes
0answers
12 views

Question about multiple NAPI contexts in linux kernel

I have a question about multiple NAPI contexts with RSS enabled. This is my understanding NAPI runs in ksoftirqd context which is a kernel thread on each CPU. By default each NAPI context has its ...
-1
votes
0answers
50 views

Sound input with C++? [on hold]

I am using C++, Linux (fedora). I would like to program something to read sound from the mic and find out it's freq. After lotsa fiddling around I found out that C++ has no built-in interface for the ...
0
votes
1answer
29 views

Redirect stderr to stdout and stdout to /dev/null when running git command

I have run into something interesting. As the title says, I am trying to redirect stderr to stdout and suppress/throw stdout. Before you flag this post as a duplicate (Shell: redirect stdout to /dev/...
0
votes
1answer
27 views

How to compare columns from different files and replace the value in one column?

I have two files: input1 22 rs145072688 14431347 C G 0.3418 0.648 0.830 0.516 0.506 0.497 0.785 0.586 22 rs201725126 14432618 G A 0.8119 1.571 1.748 1.661 1.384 1.374 1.614 1.718 22 ...
1
vote
2answers
74 views

How to comprehend the flow of this assembly code

I can' t understand how this works. Here's a part of main() program disassembled by objdump and written in intel notation 0000000000000530 <main>: 530: lea rdx,[rip+0x37d] # 8b4 &...
0
votes
1answer
32 views

How to access terminal Python process running on server from other script

Consider situation: I have an Ubuntu server with installed Python, tensorflow and other libs. My code is python script, that load several models, some of them pretrained vectors .bin, some files from ...
0
votes
2answers
22 views

Reserve CPU and Memory for Linux Host in Docker

I am running an APACHE KAFKA cluster including broker, connect and control center e.g in separate docker containers (using docker-compose). Problem is, that the load of the containers for some reason ...
0
votes
1answer
11 views

bash, find order of focused windows (similar to the alt+tab menu)

High level, I'm trying to create a utility where I can map certain keys to focus the most recently focused window of a certain name. E.g., pressing sup+c will focus chrome; if no chrome windows are ...
0
votes
0answers
16 views

Why is deadline scheduler not running on the assigned cpu by sched_setaffinity?

I'm trying to use deadline scheduler on my ubuntu Ubuntu 18.04.2 LTS with 4.15.0-48-generic kernel. Following the kernel document https://www.kernel.org/doc/Documentation/scheduler/sched-deadline.txt, ...
-1
votes
0answers
10 views

Unable to write to /sys/class/hwmon

Not too long ago I was able to write to /sys/class/hwmon/hwmon2/pwm1 to control my fan speed, now for some reason I am not able to write to any files in /sys/class I have tried changing the owner, (...
0
votes
0answers
11 views

Creat new column in file padding leading zeros using awk

I'm trying to create a new column in my text file separated by "\t". The column should bring the information of column number 18 of my original file added by left zeros until it completes 11 ...
0
votes
1answer
13 views

How to fix this cant view the login page in Codeigniter 3 running in linux

When viewing my project in codeigniter 3 stuck at configuration index.php instead redirect me in views page "login". Codeigniter 3.1.10 running in Apache 2 and php5.6 on Ubuntu. I need your help, ...
0
votes
0answers
9 views

Node Exporter bind address is already running

Node Exporter is always running on my local machine on localhost:9100 even if I don't execute it with terminal following this error message: FATA[0000] listen tcp :9100: bind: address already in use ...
0
votes
0answers
11 views

DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu

I am trying to install DBD::Oracle, either 1.74 or 1.76 on an ubuntu wsl bash on windows 10. I am on a 64 architecture, and sqlplus64 is working and I can connect to my database! Installation with ...
-1
votes
1answer
11 views

Return filename with zipgrep

I'm trying to find a certain string within a folder of zip files. Whatever I try, I can't get zipgrep to return the actual filename. (so, "file.zip") It keeps returning the files within the zip ./ -...
0
votes
0answers
25 views

at command created from php does not work if created from Laravel

I'm trying to trigger a Laravel command at a specific time, that command is created from a web interface (people can schedule an event to happen). It's not like crontab and the Laravel's Schedule ...
-3
votes
2answers
42 views

Not working „source ~/.profile“ inside bash script

To permanently update ~/.profile with source, only working on manual input. Also reboot of the whole system won‘t update ~/.profile and i need to update it manual. Is there a special code style to ...
-1
votes
1answer
22 views

How to remove encryption after using :-x in vim? [on hold]

I have created a text file using vim /test.txt and put some text on it. After this, I used: -x and it asked an encryption key and I entered it too. But now I want to remove the encryption. How can I ...
0
votes
0answers
19 views

How can I limit CPU usage for python multiprocessing.Popen-ed many parallel parts

I have an automated script which makes many parts and runs all of them in parallel. In linux, I have 16 core. If I let python script can take all 16 cores, but I want to limit core usage, for example, ...
0
votes
0answers
11 views

Message to create different types of DNS records

For work i am going to use use DNS records between two servers using a software made by the company. Mostly SRV, NAPTR and A records. To propagate the information i have to create a new type of ...

http://mssss.yulina-kosm.ru