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/

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Linux system throws an error on a .NET Core application

I wrote a console application in .NET Core for linux. When I try to run it on my linux vps it throws that error: Could not resolve type with token 01000010 at Lumo.Program.Main (System.String[] ...
0
votes
0answers
18 views

Sorting a file to get low difference between lines

I need to sort a file in a way that the character difference between lines is the mininum possible. For example, this is my input: TTTTT ATTTC ATTTT AATTC CCCCCC AACCCC ACCCCC AACCTT And I want ...
2
votes
1answer
12 views

Within each column of a large file, removing everything after a certain delimiter

I have a file that consists of many columns which look like this: 0/0:7,0:7:21:0,21,245 0/0:9,0:9:27:0,27,339 0/0:13,0:13:39:0,39,524 I want to remove everything within each column so that the ...
1
vote
1answer
18 views

Is there a way to assign different jobs (processes) to specific core in linux using python?

I have python functions that should run parallelly in a linux environment utilizing multi cores. Is there a way to specify which core should be used for each process explicitly? Currently, I am ...
-1
votes
0answers
5 views

TIME+ field in top command gives information accurate to the hundereth of a second. Can I get the same information in microseconds?

I am trying to calculate the time it takes for a thread to change status from S to R and TIME+ field of top is not granular enough for this. If there is another way to get this information, how can I ...
-2
votes
0answers
19 views

I need a theoretical exploitation for the following please: [on hold]

environment variables how they work where they are in memory wait when it waits when it doesn't what it really is for I'm basically new to C and I've been working around those concepts, but I need ...
0
votes
1answer
30 views

The source ~/.profile command throw weird error

I am trying to reload the shell, I googled a lot found this below command to fix it. But when I run the command I am getting this below error python: can't open file './test.py': [Errno 2] No such ...
0
votes
2answers
29 views

sed doesn't replace variable

I'm trying to replace some regex line in a apache file. i define: OLD1="[0-9]*.[0-9]+" NEW1="[a-z]*.[0-9]" when i'm executing: sed -i 's/$OLD1/$NEW1/g' demo.conf there's no change. This is ...
0
votes
0answers
11 views

couldn't update or install ubuntu and facing following problems. is there anyone with solution?

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-amd64/by-hash/SHA256/a7e4ec7d9ea048762b944da2be91deca615a2016198625ba1c9e4d7088d9d65e Hash Sum mismatch ...
0
votes
0answers
5 views

How can I solve these wine errors?

I am trying to run a Dayz server in linux using wine, but some errors appear. I am using ubuntu server 18.04, with version 4.0.2 Here are the errors that appear:
0
votes
0answers
11 views

How to synchronize a MSSQL database on multiple Linux servers?

I have a similar problem: Using HAProxy for load-balancing SQL Server 2008 I am running MSSQL Server 2017 Standard (Linux Edition) on Ubuntu 16.04. The system is running on EC2. I want to replicate a ...
0
votes
0answers
34 views

Why would java save empty strings when parsing this XML?

I am trying to have java parse the lines of an XML file and when it finds the line contains a specific word, get the value out of that element. This is all done through string manipulation. I have ...
0
votes
1answer
17 views

Is it possible to write Windows/Linux/MacOS-specific code in Flutter?

With flutter-desktop-embedding, we are now able to build apps to desktop environments. However, most of the plugins won't work, because they aren't written to these platforms yet. Is there a way to ...
1
vote
0answers
21 views

undefined reference for inline function [duplicate]

I have composed below small program to explain the issue, #include<stdio.h> inline void test() { printf("test inline\n"); return; } int main () { test(); return ...
0
votes
0answers
17 views

Sed Command to delete specific items in a file

Probably similar questions have been asked before, but I cant find solution to this one: The file in which I need to delete strings is : #includedir /etc/sudoers.d %wheel ALL=(ALL) NOPASSWD: ...
0
votes
0answers
9 views

Raspberry Pi 4 Video Tearing Problem Playing on Chromium

I have a web application that displays video. I'm running this on Raspberry Pi 4, OS Raspbian Buster. My app plays a video with 1080p resolution on the screen using Chromium. The video works smoothly ...
-1
votes
1answer
17 views

How can I use display device in GCP -linux?

I`m using GCP. Boot Image: c3-deeplearning-tf-1-14-cu100-20191004 Debian GNU/Linux 9.11 (stretch) (GNU/Linux 4.9.0-11-amd64 x86_64\n) Error message: _tkinter.TclError: no display name and no $...
0
votes
1answer
12 views

write numbers and remainder in file, if remainder is 0 then display it on screen [bash script]

I have a scenario when you input two numbers (from 1 to 9) and it counts remainder of them (a % b). These numbers then are saved into a file and remainder. If remainder is 0 then these numbers and ...
-1
votes
0answers
16 views

Connect Linux to Windows via ssh

Im trying to connect my Linux(Manjaro) laptop to my home gaming computer on windows 10 for jupyter notebook. I tried all gudes but they don't do anything. Main gude is microsoft official for win10 ...
0
votes
0answers
3 views

Reconnect to linux service output after exiting with Ctrl+C

Configuration I have installed RabbitMQ and Celery in a Docker container to try asynchronous tasks with Python. I connect to the running container with multiple consoles to start the services and ...
0
votes
1answer
13 views

Azure IoT Edge Bind to Specific Network Interface

When running Azure IoT Edge on a linux based device with multiple network interfaces is there a way to configure it to bind to a specific network interface?
0
votes
1answer
10 views

How do i capture execution steps when command sh -x file.sh is run | Linux |

I have a scenario where I want to capture the execution steps for particular program into a file example : lets take an example of addition of two-numbers added below script in the addition.sh my ...
3
votes
1answer
17 views

lsb_release: command not found in latest Ubuntu Docker container

I just wanted to test something out real quick. So I ran a docker container and I wanted to check which version I was running: $ docker run -it ubuntu [email protected]:/# lsb_release -a bash: ...
0
votes
1answer
5 views

Dropbox is asking for authentication : org.freedesktop.policykit.exec : /bin/sh

I am running Linux Mint 19 and after upgrading something, I started getting a prompt similar to "Authentication needed to run `/bin/sh' as super user". Expanding the details, all I got was org....
0
votes
0answers
10 views

BarcodeScanner COM API Problems

Scannermodel: Datalogic PM9500DK OS: Linux When I set my Scanner to USB-COM-STD Mode, a file /dev/serial/by-id/usb-Datalogic_ADC__Inc._Handheld_Barcode_Scanner_S_N_E18C59366-if00 is created. With ...
0
votes
3answers
24 views

Read & Remove files containing space in its name

I have to read the list of file names from file A.txt,Where the file names has space in it,So can't able remove.File A.txt is given below 20150726140135_Content 1.mp4 20150726162955_Content 1.mp4 ...
0
votes
0answers
13 views

Convert exponential to text form in script

I wrote a script which gets data from database and convert it to excel. In the script output a particular columns has numbers with many digits. When I execute the script on the excel format that ...
0
votes
0answers
7 views

mimeapps.list works only with some applications

As the title suggest, i have set up the file .config/mimeapps.list with the following settings. [Default Applications] [Added Associations] application/vnd.openxmlformats-officedocument....
2
votes
0answers
15 views

“FATAL: cannot determine kernel version” when updating initramfs

I download linux kernel-5.0.0 and try to compile and install it on my Ubuntu-18.04.3 the commands i used in /usr/src/linux-5.0: sudo make mrproper sudo make menuconfig sudo make -j4 sudo make ...
0
votes
0answers
22 views

How to upgrade rpm package using bash script?

I want to install the specific rpm packages using bash script. But I am getting error. I am using the below code : #!/bin/bash systemctl stop edb-as-10.service server_status=$(systemctl status edb-...
0
votes
1answer
28 views

why is git creating files with wrong permissions?

I'm hoping someone could help with this: I have a user: jenkins-user with a umask 0002 so that files are created with 664 as shown touch 1.txt -rw-rw-r--. 1 jenkins-user admin 0 Oct 14 12:04 1....
0
votes
1answer
34 views

Bash return code error handling when using heredoc input

Motivation I'm in a situation where I have to run multiple bash commands with a single bash invocation without the possibility to write a full script file (use case: Passing multiple commands to a ...
0
votes
0answers
11 views

Checksum speed with rsync

Is there any way to increase the checksum speed in rsync without increasing disk I/O? i.e. Is it possible to use a faster checksum algorithm?
0
votes
0answers
34 views

While read line loop in bash script keeps repeating when no input was given

I have a bash script reading a tmux session log that is running a game server console in wine. The script is just to create some custom commands for the game. Players use the /server command that ...
0
votes
0answers
13 views

How to change the test status after 'segfault' found in var/log/messages in java

So, after running a test I want to check if there is 'segfault' in var/log/messages and if there is I want to set the status of the test scenario to FAILED. The first problem was to read the '...
0
votes
0answers
13 views

How do you compile a toolchain for linux?

How do you compile a toolchain for linux?
0
votes
0answers
10 views

How to make valid AP md5 or tar file for Odin3 v3.13?

I have following files for my Samsung device: AP_...tar.md5 BL_...tar.md5 CP_...tar.md5 CSC_...tar.md5 HOME_...tar.md5 I can flash these files successfully on my device using Odin3 v3.13. My goal ...
0
votes
2answers
27 views

How to substitute piece of code after match is found | Linux |

I have a Scenario where their is a ABC.txt file In this ABC.txt file their is multiple HTML's available <HTML> <BODY> <TABLE> <TD><TR>NAME</TR><TD> ...
0
votes
2answers
41 views

How to download Git only on Docker?

I want to install only Git in the Linux container, but it wastes a lot of time due to too much "apt-get update" content. Is there any efficient way?
0
votes
3answers
24 views

Not able to install Linux::Inotify2 on freeBSD

I am trying to install Inotify2 on freeBSD, but test step throws error. cpan install Linux::Inotify2 It throws the following error: [email protected]:~/.cpan/build/Linux-Inotify2-2.1-6 # make ...
0
votes
0answers
10 views

Docker : directory mapped in volume is not created with same user of host

i'm running a docker container inside my server . in my server (host) i ve this folder : /opt/myapp/myFolder where myFolder has 755 permissions and myuser:mygroup ownership I'm using docker-...
0
votes
1answer
11 views

To split a large file (For ex., 300GB) into smaller chunks of 100MB's in linux (centos 7)

To split a large file (For ex., 300GB) into smaller chunks of 100MB's in linux (centos 7). I have tried split command it does not work efficiently as I get an error "output file suffixes exhausted". ...
0
votes
0answers
6 views

If xorg.conf.f file is exists, my computer won't run any other startup scripts(they won't execute)

So I am trying to sort out my automatic Xrandr .sh script, which is executed on startup. I have an if condition, so I don't believe I can input it into my xorg.conf.d file. But I need my xorg.conf.d ...
0
votes
0answers
31 views

Empty bash variable eating up start of next one?

I was recently editing a startup script to add command-line flags to a Java program if the bash script was launched with an environment variable present. The relevant part: ACTIVE_HEAPDUMP="" ...
1
vote
1answer
20 views

Unable to run jar executable in path on linux

I installed the clojure-lsp according to the instructions on the repository, and put the jar in /usr/bin. My problem is that I get the error Error: Unable to access jarfile clojure-lsp when I run ...
2
votes
0answers
23 views

Solution for the deletion of old Database Backups for Linux SQL Server 2017 after Backups created with Ola Hallengren scripts?

I have a problem when I want to delete older backups, I've created with Ola Halengreen scripts. USE Maintenance EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory ='/mssql/backup/'...
1
vote
0answers
28 views

How to redirect STDOUT and STDERR in a file for every command?

I'm trying to store both STDOUT and STDERR from the terminal (and if possible STDIN given by user) in a file for every command. So i started creating a trap function to execute every command in a ...
-2
votes
0answers
6 views

C program to make a system call and get info about the process

How to write a C program to get info about a system call in Linux, like no.of processes in the system, total number of system call that current process has made so far and the number of memory pages ...
0
votes
1answer
27 views

why is the error occuring when i am running the script.how can i fix it?

Here is the script was written which is based on while loop in shell scripting in Linux. I used a variable and wanted to increase the value of it till the value is less than 10. What problems could ...
0
votes
0answers
22 views

How to print yaml file content outside docker

I am trying to write a software that prints content of target yaml file in docker instance from outside of the instance. The purpose of this prototype is to demonstrate of effectiveness of enclave on ...