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 distro's SE site like https://askubuntu.com, https://elementaryos.stackexchange.com/

0
votes
0answers
30 views

Is there a way to find the root of this error?

Im trying to compile some files with this given gcc command on a server cluster through Mac terminal: gcc -o driver -std=c11 -Wall -W -ggdb3 driver.c ASMParser.c ParseResult.c Generate.o Grader.o ...
0
votes
0answers
13 views

Starting ./manage.py runworker in the background

I wanted to know what my options are of starting ./manage.py runworker in the background. I tried doing this python ./manage.py runworker 2>>./daphneWorker.log >&2 but that does ...
0
votes
0answers
14 views

How to hide PHP code on the server from other person under root?

Good day! There are PHP scripts, classes, configs. All this stuff is interconnected, I need to give a person access to the server so that he works (started under the root) with these scripts, while ...
-1
votes
0answers
12 views

How to script daemon startup in Linux

I'm Windows admin. I have a task to run an executable as daemon that is start up every time with system in Linux. A limitation is, I can not configure manually and have to provide entire sequence of ...
-1
votes
0answers
10 views

encoding in special characters in cURL

i have been trying to encode the below url. i have read up on example after example but have not been able to find anything that works yet. i have seen several references to --data-urlencode / -data ...
-3
votes
0answers
27 views

Check if pid is running in Linux freebsd [on hold]

Hello guys my problem is the code works perfectly but not my solution. I will the command without output. Add the /dev/null 2>&1 tag and more but then works the function not The compile ...
-1
votes
0answers
9 views

Genymotion unable to start because of VBoxManage error?

I don't know if this question belongs in this community but I hope someone can help. I installed VirtualBox and Genymotion on Ubuntu 18.04 But, when I run Genymotion it starts to boot and it shows ...
6
votes
0answers
52 views

bash: ./helloworld_s: no such file or directory. The file is clearly there

I'm not unfamiliar with bash, but this is the first time I have ever seen this happen. [OP@localhost linking]$ ls helloworld-lib.o helloworld-lib.s helloworld_s [OP@localhost linking]$ ./...
0
votes
1answer
23 views

How to write and read a file with forking in C

i'm wondering how can we write and read in a multiprocess program written in C? I tried using flock and file descriptors but it didn't work. Is there anyone to help me? Thanks. int f; ...
0
votes
0answers
16 views

How to create and write image to framebuffer? [on hold]

I'm looking for a solution to how I'd write to the framebuffer on my Linux system. Specifically, I want to create an image out of multiple sprites, put them together and write them to the framebuffer ...
0
votes
0answers
14 views

Keyboard Buffer /dev/input/event*, how to read from?

im trying to write a code, and i saw here on stack overflow that i can use the linux/input.h lib to read from /dev/input/event1 (whici is my usb keyboard buffer), with the: ``` struct input_event { ...
-1
votes
0answers
15 views

How to run Nginx within a Docker container and set it up to reload its configuration every 6h?

I'm runnign NGINX in a Docker container, and I'm trying to find a way to start it up using docker run in a way that would order my NGINX to reload its configuration every 6h. I need this to be done, ...
-1
votes
1answer
19 views

Why do I need eval to make a comma-separated list generated for brace expansion be honored? [duplicate]

I'm writing a small script to do some user creation automation and i have an issue creating directories. I know that using eval is not a good idea due to security issues so i'ld like to know why the ...
2
votes
0answers
19 views

How to use do_mmap() in kernel module

I would like to use do_mmap() in a kernel module. According to this question this should be possible. Here is a minimal non-working example: hp_km.c: #include <linux/module.h> #include <...
0
votes
1answer
13 views

How to add custome template in Vim?

I want to have my custom template added whenever I create a .java file. What modifications do I need to do to my .vimrc? I've tried mapping and stuff but, that didn't help .
-1
votes
0answers
16 views

How can I determine the maximum possible size a single file can have on an empty ext4 drive?

I have an empty ext4 formated hard disk and would like to create a single file that takes up all available disk space. And I would like to know the size of this file before creating it. My approach ...
1
vote
1answer
22 views

How to make C program communicate with Python program using Linux's virtual serial ports?

I would like to send data from a C program into a Python program that will visualize this data. Development environment is a Linux (Ubuntu 18.04LTS) computer. To be clearer, both of the programs are ...
-1
votes
1answer
13 views

Redirecting a command with parameters to a file

I have the following command /home/ec2-user/MyDomain/bin/daphne -b 0.0.0.0 -p 8001 main.asgi:channel_layer I would like to redirect the console output to a file. I tried doing this /home/ec2-user/...
-1
votes
0answers
16 views

Performance of linux on virtual machine with windows host vs linux on physical machine [on hold]

I'm currently working in a company where everyone needs to use windows (though it may change). As a developer I prefer linux, mainly because of performance (in my case 2-3 times faster build). Suppose ...
-1
votes
1answer
18 views

where will be nohup.out file created when shell script is executed by Java Runtime?

when I'm executing shell script through java Runtime.exec(), where do I find nohup.out file. String command ="nohup ksh /home/xyz/script.ksh &"; Runtime rtime=Runtime.getRuntime(); rtime.exec(...
1
vote
1answer
32 views

Linux Kernel Where to lock and unlock semaphores?

Within the Linux Kernel (specifically for device drivers), how would I know what variables to lock and when they need locking? In particular, why does the locking in the following code only happen ...
0
votes
0answers
5 views

How to tell diff/kdiff3 to interpret a line as unique only until when the string is absolutely unique up until “=” sign?

I have 2 .ini files, they are out of order, contain both common and unique strings to them, and the unique keys often share a common body and are often interpreted as non-unique by diff/kdiff3. In ...
0
votes
0answers
8 views

Inotifywait giving wrong file path after running ffmpeg

So im running a little inotifywait script to monitor a folder for new files and transcode them if they are mxf and contain a video stream. But for some weird reason if the script does call ffmpeg the ...
1
vote
1answer
26 views

Linking a program using printf with ld?

I'm getting a undefined reference to _printf when building an assembly program that defines its own _start instead of main, using NASM on x86-64 Ubuntu Build commands: nasm -f elf64 hello.asm ...
-1
votes
0answers
29 views

I can't install python3 correctly on Ubuntu

I can't install python3 correctly on Linux Ubuntu 18.04.2 LTS. It appears to me the next error: "Ignoring ensurepip failure: pip 9.0.1 requires SSL/TLS" I've tried to install SSL/TLS dependency ...
1
vote
3answers
34 views

linux - print range of rows if a condition is met in AWK

What I am trying to do is to show 2 rows above and 2 rows below a line that meets a certain criteria without a pipe, using awk. For example, I am searching for the string 's62234' and when found, I ...
0
votes
0answers
22 views

Why can't gcc locate files in directory? [duplicate]

When I run the attached script I get an the error "gcc: fatal error: no input files". I don't know where the problem is. Anyone knows how to get gcc to read the files? I'm using a Linux console bash ...
0
votes
0answers
9 views

Having problems with pyscreenshot

I am having errors with pyscreenshot. I am running off of a linux VM on my chromebook, and was trying to automate a game. I have been getting this error: OSError: cannot identify image file '/tmp/...
2
votes
1answer
31 views

Is using fcntl F_SETLKW on STDOUT_FILENO legal?

I have multiple processes spawned via fork from main program, which means they output to same stdout (which I want). However I need to somehow prevent the output from being interleaved. I already use ...
0
votes
0answers
16 views

OSError: [Errno 8] Exec format error, throws Exception for firefox. selenium & geckodriver [duplicate]

I have the following script to convert a .asm file to a .com file for 8080 assembly. I've installed selenium for python 3(since the script needs python3), and tried to install geckodriver. I ...
1
vote
3answers
42 views

Launch two processes simultaneously and collect results from the process finished earlier

Suppose I want to run two commands c1 and c2, which essentially process (but not modify) the same piece of data on Linux. Right now I would like to launch them simultaneously, and see which one ...
-1
votes
0answers
27 views

How i can convert the file of any database to CSV? [on hold]

I have a problem that any folder containing any type of database I want to convert all the file to CSV format. Is there are any utilities in Linux so that maximum no. of database file can be converted ...
-1
votes
1answer
28 views

Running python in the background, need to take user input first

I have written some code that I would like to run in the background as it is very time consuming (on the order of hours). I would normally run python3 program_name.py >> output.log & ...
-1
votes
3answers
42 views

How to run multiple Linux commands in Python file [duplicate]

I use these three Linux commands one after each other in terminal to enable monitoring mode on Raspberry Pi 3. iw phy phy0 interface add mon0 type monitor ifconfig mon0 up airudump-ng -w mon0 I ...
-1
votes
0answers
10 views

“Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script”?

I have a Galera Cluster in production which hosts 3 nodes. Nodes are Debian 9.5. I did some stupid stuff and edited my.cnf and corrupted some stuff. I reverted it back after long hours of fighting. 2 ...
0
votes
1answer
19 views

How to read error62 in strace log?

I am trying to read an output of strace log. I got this line: write(3, "Error. The program should receiv"..., 62Error. The program should receive a single argument. Exiting. ) = 62 Can you help me ...
-1
votes
0answers
14 views

linux kernel hangs at Registering SWP/SWPB emulation handler on zynq-7000 (z-turn)

I'm trying to get embedded linux running on my Zynq-7000 (z-turn) board follwing mainly this instructable and z-turn linux development manual documentation. I've created boot.bin, uImage, ramdisk and ...
0
votes
2answers
55 views

How to get home dir of the current user in shell script file? [on hold]

The current user I logged into the host is: jack. There is a shell script file named foo.sh in the /home/jack/test/ directory. The contents are as follows: #!/bin/bash myhome="$HOME" echo $myhome I ...
-1
votes
0answers
13 views

/dev/root full every month, should I increase the partition or move the apache log path? [on hold]

OS : Ubuntu 12.04 My partition /dev/root gets full every 3 weeks (20GB). So I cd /var/log/apache2 and remove old log files (this free ~10GB). I would like to patch this, should I increase /dev/root ...
1
vote
1answer
26 views

will the timer started by “setitimer()” be restarted?

Each task_struct in linux kernel has a field named "real timer", which is a struct hrtimer (high resolution timer). When we set a timer using setitimer, it sets the "real timer" in the process to be ...
-1
votes
0answers
14 views

Which Package cloudways or digital ocean using for their droplet?

I want to create as like cloudways and digitalocean droplet, I mean customer can create droplet from my server. How can I manage droplet hosting and which packages digitalocean or cloudways using for ...
0
votes
0answers
27 views

Why is PHP stuck on mysqli_connect with no error code?

On the line $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName); PHP stops with no error. This is for a new Linux server, running PHP 7.0, Apache 2 and MariaDB 10. I don't know ...
-1
votes
1answer
19 views

Using C# Process VS bash to execute linux commands [on hold]

I'm trying to execute linux commands on some remote devices. I have tried to write my script with bash at first but thought of using C# and use Process instead for better maintainability and code ...
-1
votes
1answer
14 views

OpenVPN client is not working on Windows computer?

I try to run my OpenVPN client on my windows 10 machine in order to connect to a remote OpenVPN CentOS 7 server but it does not work. I get the error below: Options error: --capath fails with 'C:\...
0
votes
2answers
29 views

I need to run a PHP script I wrote as a task on my server

I need to run a PHP script which is scraping a website for data, and I need to run it on my VPS which has linux. I want to run it as a task so that I should be able to logout of my VPS and the script ...
0
votes
1answer
14 views

How do segments from a single memory page behave when mlock'd?

The man page for these system calls state that memory locking and unlocking is preformed in units of whole pages. Assume that I have called mlock(2) to lock multiple address ranges from a single page ...
-1
votes
1answer
18 views

Centos 7, VirtualBox, Guest Additions [on hold]

I installed the new kernel which fixed a mouse issue, but now I do not have full screen anymore. I am trying to get guest additions to work again but I am getting this error:
-1
votes
0answers
22 views

getting “Unexpected end of file” syntax error. are all while loops and if statements correctly ended?

Getting Syntax Error: unexpected end of file I assume it means i did not end a if statement or while loop correctly but i checked the program multiple times. tried overlooking code for if statements/...
-1
votes
0answers
13 views

Lubuntu LAMPP error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

I Use Lubuntu 18.04 64Bit, I just install xampp for linux When i start the xampp with this command sudo /opt/lampp/xampp start I got error cat: /opt/lampp/lib/VERSION: No such file or directory /...
-1
votes
0answers
17 views

Gtk+ error when executing something in ssh terminal

I connect from a Ubuntu 18.04 PC to my Raspberry Pi via SSH. When execute something say Filezilla via SSH terminal it would always just open the window on the RPI. Now I got the GTK+ error saying that ...

http://mssss.yulina-kosm.ru