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
4 views

Linux web server configuration for AJAX web page highly consumed CPU

I have www service with chat used for many users at same time based on AJAX which consumes a lot of CPU resources and needs many database connections. I’m asking about server configuration for such ...
-1
votes
0answers
4 views

What knowledge (technology) stack is needed for web pen testing?

Getting into web pen testing from scratch. What knowledge (technology) stack is needed for web pen testing? Can you share your story? studying courses now: Learn Ethical Hacking From Scratch and ...
0
votes
0answers
6 views

How to add a field in vfs inode?

I need to add a field in vfs inode.Before I add it,the android phone work fine.But no matter where and how I add a field in inode,the phone's touch screen can not work any more.But the phone's other ...
0
votes
1answer
20 views

logout a user from the system using a function in python

I am developing a GUI. I have a button that upon clicking it, the system reboot off using: os.system(reboot now -h) Now I want a similar button that will logout the user. logout is not a command in ...
0
votes
1answer
12 views

How to transmit a headless window browser from a remote server to my local computer?

I have several remote servers on which I run headless Chromium browsers. I've begun to need to be able to see the actual browser windows from the remote servers and be able to interract with them. On ...
0
votes
0answers
6 views

Ioctl equivalent in userspace

From userspace application I read some data using IOCtl from kernel driver synchronously. Similarly is there a way for my userspace app to read some data from another userspace driver/app ...
1
vote
0answers
15 views

how to use audit in linux to monitor a file using libaudit

A previous question showed code for libaudit How to use libaudit? but the answer is not a complete example. I added include files to create a mwe, and it doesn't work. In this case, I am monitoring a ...
1
vote
1answer
18 views

How to run a Java application using swing-library in a linux shell without a desktop environment?

Currently, I have a example Java application for testing. It uses the java swing library. I try running it with the xserver in a linux shell, so I'm not using a desktop environment. Usually, you can ...
0
votes
1answer
32 views

Using sed to replace a pattern by symbol

How do I replace a pattern by looking at sentence symbol by using sed? Input this- -this- Results I want start middle My code sed 's/[a-zA-Z]-/start/g' sed 's/-[a-zA-Z]-/middle/g' Results I get ...
0
votes
0answers
18 views

Why are service accounts used?

I'm currently setting up a Linux VM for creation of a dynamic website. I know service accounts are a common occurrence in these instances, however I am not sure the purpose of them. To my knowledge ...
-2
votes
0answers
20 views

Docker undo remove container [on hold]

docker container rm container id Remove the container, Can the container be restored?
0
votes
0answers
6 views

puppet delete a directory and replace it with a link

I am working a Puppet manifest that configures a router in the equipment that I support. The router runs pretty much plain vanilla Debian 8 or 9. The problem is in the way the SSD on the router is ...
0
votes
1answer
29 views

Is there a way to “escape” linux commands?

I'm making an service that will allow users to post files to my web server which will then copy that file (after a few checks) to the image server. The main way of communicating between my web server ...
-1
votes
0answers
31 views

How to run vcxproj in ubuntu 18.04 [on hold]

I want to run the code in this project in Ubuntu: https://github.com/yusufasln26/geneticAlgorithm-pathPlanning It is GUI C++ project. I tried to run this project using Ubuntu Terminal, but it did not ...
0
votes
1answer
19 views

ImageMagick V7 and Trimming Tool for Multiple Images

I am trying to trim multiple images in a folder using ImageMagick V7 on Linux CentOS 7 via this command-line: magick mogrify -trim +repage -path /projectnb/burbsp/home/ialalawi/research/idl/...
-1
votes
0answers
11 views

FreeBSD syncookies mechanism

I am working on FreeBSD TCP/IP stack. it seems there are 2 syn flood mechanisms, syncookies and syncache. my question is about syncookies, Does it enable from the beginning? or when the SYN queue ...
1
vote
2answers
29 views

ImageMagick V7 and Cropping Tool

I'm trying to crop an image using ImageMagick V7 on Linux CentOS 7 via the following command-line: $convert -crop 256x256+224+384 test2.png Cropped.png My input image is test2.png, my output image ...
0
votes
4answers
51 views

Using bash, awk or sed to templatize a CSV file into a SQL file

I will have a CSV file (say, ids.csv) that I need to ETL into a SQL script (say, update_products.sql). The CSV will be headerless and will consist of comma-delimited numbers (product IDs in a database)...
-1
votes
0answers
19 views

Have different Vim configuration settings depending on directory [duplicate]

How can I have a different Vim option depending on my current directory. For example say I have 2 directories: dir1 and dir2. If I'm in a subset of dir1 (ex. /dir1/a/b/c) I want the Vim option ...
-1
votes
2answers
21 views

Convert a folder with softlinks to hard copy [on hold]

Is there a linux command to copy an entire folder with softlinks and save or convert it to a folder with hard copies of the files?
-2
votes
0answers
15 views

Need to reinstall wifi adapter in kali linux [on hold]

I installed kali linux (dual boot ), and i wrote the commands to get wifi adapter, but when i restart the device i need to rewrite the commands to get the adapter again. This is my commands: 1-sudo ...
0
votes
1answer
9 views

Need unplug/plug to access at USB port ChromeApp

I want to do a chrome-app to receive print requests. This app need to connect to a printer via USB, but I need to unplug/plug the printer when I reboot the PC in order to have access to it, why do I ...
0
votes
0answers
15 views

Connect sqlsrv with Xampp in Unintu 18.0.4 [on hold]

I want to add SQL server to Xampp, I did before for windows but now the server changed to ubuntu 18.0.4. what's the step? (I know how to download sqlsrv.so file and changing php.ini, any extra step ...
0
votes
1answer
17 views

Tomcat is not loading on browser after deploying geoserver WAR - Ubuntu

I installed tomcat 8 on my ubuntu 18.04 system. Later I have downloaded geoserver web archive from geoserver page and deployed the war file on /var/lib/tomcat8/webapps. Tomcat is working fine before ...
0
votes
1answer
43 views

noob - Syntax error: redirection unexpected [duplicate]

Noob shell scripter here. I'm in a bash shell. Running the following script as myself works but not when I use sudo. As you can probably tell, the touch error is just to make sure something is ...
0
votes
3answers
77 views

Remove files with the similar name except one?

I want to remove all previous versions of Tableau Reader.app from applications apart from the latest one. I want to do this through command line. The problem that I am having is I want to remove all ...
1
vote
1answer
33 views

Killing subprocess from inside a Docker container kills the entire container

On my Windows machine, I started a Docker container from docker compose. My entrypoint is a Go filewatcher that runs a task of a taskmanager on every filechange. The executed task builds and runs the ...
1
vote
1answer
33 views

git diff --numstat by strings instead of file paths

I'm trying to run git diff --no-index --numstat <string> <string> on Linux (Debian Docker container), but I'm failing in finding a way to achieve this. In essence I want to pass the files' ...
-1
votes
0answers
11 views

How to fix no audio issue for external calls via freeswitch

I am running two Freeswitch servers based on linux. This is the basic topology user 1001 ---> fs_A <--------> fs_B <---- user 1003 fs_A ip is 10.38.0.100 while fs_B is 10.38.10.100 I am ...
-1
votes
0answers
31 views

Can't login Ubuntu 18.04 after restart and write commands [on hold]

After installing a package and remove it with apt-get, I restarted Ubuntu and can't log in again. When I trying to write in any tty and recovery mode instead of character put square and can't write ...
-1
votes
0answers
27 views

Under Linux, how to register to detect when file is read, written, etc? [on hold]

In trying to learn about security under linux, I started reading SELinux and AppArmor). I read that linux security modules was the underlying API, but then the wikipedia article discusses that it ...
0
votes
0answers
23 views

Jenkins: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean, but execution happens from command prompt

I am trying to run a maven project from Jenkins in my local machine. I am new to Maven and Jenkins and trying to get hands on by trying to run a project from jenkins locally. I have created a simple ...
0
votes
3answers
52 views

programming EXACT timer which calles a function in c language every x seconds

I need some help with a part of my Programm. I want to call a function EXACTLY every x seconds. The problem with the most soultions is, that the time to call the sleep() or w/e function stacks over ...
0
votes
0answers
22 views

how to resolve time difference of 8 hours mariadb and nodejs on same linux server

Would like advise on why there is time difference of 8 hours and how to resolve it? Thanks The actual date and time of execution is 2019-08-16 10:37:41 MariaDB table pure insert SQL statement : ...
-2
votes
2answers
48 views

Extract the file name of last slash from path [on hold]

I am finding the files in specific location now I need to extract the file name which is after last slash from that path without its extension like *.war by using shell scripting. I tried below to ...
-1
votes
0answers
13 views

Bluetooth LE device disappearing after scan on Rasbian [on hold]

I have BannanaPI board computer with USB bluetooth adapter (CSR 4.0) and two Bluetoth 4.0 LE devices: Xiaomi Hygrothermograph (Firmware 00.00.66) MiFlora Flower care device (Chinese version, Firmware ...
-1
votes
0answers
17 views

How to copy the file from Linux server to Windows remote desktop via bash script? [on hold]

I am wonderding how to create a Bash script to copy file automatically from Linux server to Widnows remote desktop... This file will be a trigger file that is being copied on daily basis and then ...
-1
votes
2answers
25 views

unable to remove a file - terminal is splitting file name into two [on hold]

Hie, I know that the question might seems to basic or silly. i have a file which is named 20190716000001_add_update_customer_review_ permission.sql when I am trying to remove the file by the ...
0
votes
0answers
54 views

Set environment variable as different user when program itself run as root

I want to set environment variable as user 'abc' and my program runs as root. I have tried with 'seteuid' but it affects the whole application's threads which is running as root. When I provide su abc ...
0
votes
2answers
17 views

listing files in UNIX owned by a particular user

How do I list the files owned by a particular user in UNIX ?. If I use ls - l command in a shared directory ,it lists all the files with the details .This shared directory contains many files created ...
1
vote
1answer
45 views

why bits/libc-header-start.h folder is included in stdio.h header

I am unable to compile to c program for 32bit machine from 64bit linux machine using command gcc -m32 -Werror a.c -o a It shows me the error In file included from a.c:1: /usr/include/stdio.h:27:10: ...
-1
votes
0answers
7 views

exim4-config : Conflicts: postfix but 3.1.0-3ubuntu0.3 is to be installed [on hold]

I want to install postfix on my ubuntu. It is throwing error when i try to install: [email protected]:~# apt-get install postfix Reading package lists... Done Building dependency tree ...
-1
votes
0answers
16 views

TCP port 111 remains in ESTABLISHED STATE even the client closes the connection [on hold]

The SUN-RPC port 111 never closes and remains in ESTABLISHED STATE causing DoS Service To Simulate this behavior issued a dummy connection $ telnet myserver 111 Trying 10.63.33.245... Connected to ...
-3
votes
0answers
30 views

Erratic behaviour of `find` command [duplicate]

I have written an Ansible role to perform a certain repetitive task before the deployment of my application on a remote server. One of the Tasks in the role use shell's find command to search for all ...
-1
votes
0answers
18 views

How to install Windows 10 in Virtual Box on Linux Ubuntu 18.04? [on hold]

Failed to open the disk image file /home/thakur/MyData/system softwar/Win10_1903_V1_English_x64.iso. Could not get the storage format of the medium '/home/thakur/MyData/system softwar/...
-1
votes
0answers
12 views

Enable fingerprint in deepin for Xiaomi air 13 [on hold]

Deepin OS don't recognize Elan Microelectrnics Corp of xiaomi air fingerprint. I post it, maybe to someone it'll be useful, i solved it like this when you run in terminal: fprintd-enroll the output ...
0
votes
3answers
41 views

File created using Python is written to wrong directory [on hold]

I'm trying to create a script that will create a new file within one of my sub-directories. (A sub-directory of which my .py script isn't located) This following bit of code works, however when I ...
0
votes
0answers
12 views

No package devtoolset-4 available on CentOS 6.9 [on hold]

I try to use C++14 in CentOS 6.9, but it does not work. sudo yum install centos-release-scl sudo yum-config-manager --enable rhel-server-rhscl-7-rpms After that, [myname ~]$ sudo yum install ...
1
vote
1answer
26 views

Running Python Code in C++ Cmake can't find PyUnicode_FromString

I am trying to run python code in c++ #include <python3.7/Python.h> // PYTHON START Py_Initialize(); PyObject *module_name = PyUnicode_FromString("plotter"); PyObject *module = PyImport_Import(...
0
votes
0answers
26 views

Initializing a multiprocessing.Manager object gives EOFError randomly despite having a deterministic code

In my project I want to have a shared list that I can manipulate when calling a function using multiprocessing.Process. My code runs deterministically and I am using a Unix-based OS and I don't change ...