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

ls -lrt in Linux

How does ls -list listing works in linux. 1) If there are multiple files and directories in my current folder and if i run ls -lt will it sort in descending order based on time for files and ...
1
vote
2answers
23 views

Merge 3 columns into 1, linux

I have 1 csv file with 16 columns that looks like this : WEB QUEST|Lazaro|Martinez|0|Consultor de ventas|Mexico|DF|55457110|55450327|53445299|0|05/10/1999|0|0|0 I´ve tried to merge 3 columns ...
0
votes
0answers
27 views

Clang: error compiling c++ Expected member name or ';' after declaration specifiers

I am trying to run SPEC2017 benchmarks using llvm testsuite according to LLVM's Test Suite Guide. My cmake command succeeds, but with make, I get errors in include files like numeric_traits.h. I get ...
-1
votes
0answers
8 views

Creating multiple socks5 proxies using a single server with multiple assigned IP addresses

I have a linux server at a webhost, from whom I have also purchased 9 additional IP addresses. In total, my server has 10 IP addresses. I want to set all of them up as SOCKS5 proxies. How do I go ...
0
votes
0answers
7 views

EC2 Instance has been running selenium headless chromedriver, and now is running out of space

I've been running Selenium headless chromedriver to scrape data from websites for a few days, and recently ran into an error: selenium.common.exceptions.WebDriverException: Message: unknown error: ...
0
votes
1answer
29 views

Will process load into memory with 4 or 8 alignment rule

I just learnt about 4 or 8 memory alignment and came about this question. Will Memory alignment happen in virtual memory space or absolute addresss? I guess the answer is virtual memory space, and ...
-1
votes
1answer
17 views

How do I hibernate a VM and boot it on a new machine without losing state of processes?

I have a linux VM running some processes. I want to pause these processes, shut down my VM and boot this VM on a different machine in such a way that all the previously running processes resume ...
-1
votes
0answers
13 views

Change password on Whonix OS

Ok, so I installed Whonix onto virtuabox and have no way to change the password from its default "changeme" password can anyone tell me I looked all over the internet and had no luck, the version of ...
0
votes
0answers
8 views

O_PATH equivalent in Linux kernel before 2.6.39?

In latest kernel I use the following code to operate the inode of a symlink file: file = filp_open(filename, O_PATH | O_NOFOLLOW, 0); If I don't add O_PATH, filp_open would fail with -ELOOP. On ...
-1
votes
0answers
13 views

qemu-bridge-helper assigns the same ip to all VMs

I am trying to have the VMs appear on the external local network with unique ips as if they were a separate regular computer on the local network. I was able to do that with one VM. However, when I ...
0
votes
0answers
16 views

Linux C open() - creating new file based on existing ,with the same permissions

I have to create a program that will create new one or overwrite existing(outfile), with the content of an already existing one(infile). For me, this is easy, I've already done this. But my problem is,...
-1
votes
0answers
25 views

Remove duplicates before comma and write it to a text file using Awk [on hold]

I have a file apple,45 orange,16 banana,98 lemon,37 orange,23 kiwi,66 banana,88 melon,88 banana,65 grape,88 banana,76 I want to remove duplicates if more than four before comma and append it to a ...
0
votes
1answer
20 views

Running Exec() Command Parameter

I am student developer and beginner in C programming language. I have a task and I did not find a clear solution according to my level. I want to run exec() function in child process. I created parent ...
0
votes
2answers
35 views

How can I redirect to a function that is further down in my code?

if [[ $adapter == "1" ]]; then LINE 66 > usepreferredadapter elif [[ $adapter == "2" ]]; then echo -e "\e[0mI'm sorry you do not own the requirements to proceed!" echo "Try using the adapter ...
0
votes
2answers
17 views

Parent/Child and pipes in C, child-parent comunication

I have a parent program that sends a integer to a child, and the child program multiplies the number by two and gives back to the parent. In a main program I create a pipe and fork() and execl() the ...
0
votes
1answer
19 views

What are the ways to check a process with specific pid exists and active?

What are the ways to check a process with specific pid exists and active? I am using Ubuntu Linux with gcc.
-1
votes
0answers
13 views

Honeypot logs gateway’s IP instead of incoming ones [on hold]

There is a virtual machine ( Virtual Box) managed by OS Xubuntu and a kippo( ssh-trap) on this one. NAT have been adjusted in the VM’s setups with port forwarding by this way: ssh tcp 195.x.x.x 22 10....
-2
votes
0answers
21 views

Bash script to move files from a folder to different folders, depending on their type [on hold]

I've installed Windows 10 as guest os with qemu-kvm on Ubuntu 19.04 as host os with the passthrough on my PC. I have also configured samba because i want to share a folder in Ubuntu where I will copy ...
-1
votes
2answers
32 views

Linux bash '[: -ge: unary operator expected' error

#!/bin/bash SubValue() { romanvalue="${romanvalue}$2" decvalue=$(( $decvalue - $1 )) } if [ $decvalue -ge 1000 ] ; then SubValue 1000 "M" elif [ $decvalue -ge 900 ] ; then SubValue 900 "CM"...
-3
votes
0answers
23 views

Can`t install R 3.6.1 correctly in Ubuntu

Primarily I have had R 3.6.1 but decided to install earlier version with purpose of using some population genetics packages unavailable in R 3.6.1. I didn not know how to downgrade the version, so I ...
-2
votes
0answers
9 views

Springboot Jar rest api connection refused with different hosts/server

i have developed a rest api in springboot when i started jar on cmd prompt and try to read it on nodejs (angularjs) it works fine. (basically on same host/machine) But when I deployed it on linux, ...
-1
votes
1answer
26 views

How to tail output from adb logcat and execute a command each new line

I'm trying to do very likely to this post but instead of reading from a file I want to "subscribe" to the output of adb logcat and every time a new line is logged I will run some code on this line. I ...
-2
votes
0answers
10 views

Unzip recursive files (tar, bz2.gz) files as bz2 sub-folders

I am using MacOS and have a tar folder that includes a large number of bz2.gz files inside the tar folder. These .gz file can be manually unzipped if I clicked the file in the Finder. For example, ...
-1
votes
0answers
16 views

Linux command to get all but the first line of a text file [duplicate]

How can I write a bash command to get all but the first line of a text file. For example, from 2 2.1 3.9 I would like to retrieve 2.1 3.9 to stdout or to a file.
-1
votes
0answers
23 views

What does “command -v” command means [duplicate]

I came across following line of script and I don't get what does "command -v" do. I have done some research about it but I could't find any specific information. if command -v curl &>/dev/...
-2
votes
0answers
20 views

Linux kernel iptables [on hold]

I've compiled a kernel which include USB wifi adapter drivers for my OnePlus 3 phone. I compiled the kernel for Oreo and everything is working as expected. But with the same settings I compiled a ...
-2
votes
0answers
12 views

Error in android sdk after running command

I am using android sdk in Linux without using android studio but when I call sdkmanager through CLI I get this error: Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/...
-2
votes
0answers
17 views

How to get libicui18n.so.57? [duplicate]

I'm using QT to build/run and i'm getting error: /usr/local/Qt-5.11.3/bin/uic: error while loading shared libraries: libicui18n.so.57: cannot open shared object file: No such file or directory /usr/...
0
votes
2answers
55 views

Is there any random generator library except rand(), which developer can manually set the seed?

I want to verify that if the seed is same, the resulting pseudo random number is same. Using rand() is the simplest but I'm looking for safer way. I found that using device entropy with /dev/random of ...
-1
votes
1answer
26 views

How to fix string declaration error in scope

I'm trying to run an interprocess communication program but it says string is not declared in the scope as is and when I add #inlcude I get an error that says: receiver.cpp:25:35: error: invalid ...
-1
votes
1answer
18 views

command not found but found when i drag and drop [duplicate]

i run flutter command in the flutter directory but it says command not found root/korra:/Desktop/flutter/bin# flutter bash: flutter: command not found but if i drag and drop the flutter to ...
-1
votes
0answers
8 views

Changing window size of external application with Node.js on Linux

I used Node-ffi and functions from user32.dll file to manipulate window sizes(winuser.h) and locations from my node.js application on Windows operating system. I'm Interested how can I achieve same ...
-2
votes
1answer
20 views

How to see the bytes of a websites public key in the command line?

I am trying to see the bytes of the public key presented in the certificate used by https://www.unh.edu/ How can I see this in the terminal? Thanks!
0
votes
0answers
28 views

/usr/bin/ld: build-debug/obj/gpsitem.o: file not recognized: file truncated

I'm using QT to build/run and i'm getting the error: /usr/bin/ld: build-debug/obj/gpsitem.o: file not recognized: file truncated /usr/bin/ld: build-debug/obj/gpsitem.o: file not recognized: file ...
-1
votes
0answers
27 views

C++ and SDL console output [on hold]

I am using C++ and SDL I have problems when I try to output with cout I don't get any output I want to print the fps because I like to know how much fps my game is running in firstly I thought it ...
-3
votes
0answers
16 views

Reduce size of kernel in operating system? [on hold]

Remove unnecessary driver or to reduce size of kernel in OS either in linux or Windows.
-1
votes
0answers
15 views

Direct PCI access is restricted; see man kernel_lockdown.7

I'm trying to read and write from PCIe memory by mmap'ing the /sys/bus/pci/devices/.../resource0 file. However, It generates this message in dmesg: Direct PCI access is restricted; see man ...
-3
votes
0answers
21 views

Installation of internet explorer in Ubuntu 18.4 [on hold]

How to install internet explorer in ubuntu 18.4 can anyone please assist on this...thanks in advance.
-1
votes
0answers
17 views

Trigger webpage view from linux command line

I am using a shared file download service which deletes the file if the file's web page has not been visited in 30 days. I need to store my files for longer than 30 days. I am using a Centos 7 based ...
2
votes
2answers
45 views

Is it possible to start a linux process, getting the PID, but start running later on certain condition?

I'm thinking about some tool that can pause the program at start. For example, my_bin starts running at once. $ ./my_bin With this tool $ magic_tool ./my_bin my_bin will start. I can get the PID....
0
votes
0answers
10 views

Hook symbol lookup failure to provide fallback at runtime

The loader performs a dynamic symbol lookup just before a symbol is used, and it will report "symbol lookup error" if the symbol is not found. What I'd like to do is register a hook somehow so that if ...
-1
votes
0answers
21 views

Create unix command interpreter [on hold]

I'im trying to create a simplified UNIX command interpreter. Are there any tutorials on how to create a UNIX command interpreter?
-1
votes
0answers
9 views

Disappear of linux partition

i had windows and i install a Linux now my laptop have 2 hard drive in sdb i have a 4 partition now i install kubuntu but just show 1 partition of sdb http://uplod.ir/x7o9gus0vuo7/sc.png.htm in "...
0
votes
0answers
21 views

umask and chmod unexpected behaviour

I am trying to write simple program that changes file privileges using umask and chmod system-calls, but file privileges do not change as expected. This is what I've tried: Set umask to 0; If the ...
0
votes
0answers
23 views

How to display output for checking password minimum length of 10 or greater via /etc/security/pwquaility.conf in linux?

How do I make a script into an if-else statement that checks whether the password minimum length is either equal to 10 or greater. It should display the "Vulnerability: no" if the min length is 10 or ...
1
vote
0answers
20 views

Optimizing the footprint of Python Installation for Embedded System

I have one embedded system on ARM running Linux compiled using Yocto. It has python3.5 but it's size has been increased by 80MB and it is not acceptable. We are looking to reduce it atleast by 50%. I ...
-5
votes
0answers
27 views

The principle of /dev/null and dev/zero How did they do it? Linux

The principle of /dev/null and dev/zero How did they do it? Linux
1
vote
2answers
39 views

How to use cut command along with text qualifier

I have a text files that contains comma separated values. Example file formats: cat abc.txt A,B,C,D cat xyz.txt A,"1,2,3",C,D I want to cut the second column from these files delimited by comma. ...
-3
votes
0answers
19 views

Setting up minecraft server service on usb hard drive problem

I'm trying to set up a minecraft server to play with my friends. It's my first time doing this on linux, so I have a (I believe) small problem. I can't figure out how to set up it on my usb hard drive....
-1
votes
0answers
12 views

How to mount a ubifs image on ubuntu

I have a ubi file what I'm trying to mount on my ubuntu machine. Googling lead me to this link: https://pjankows.blogspot.com/2012/01/how-to-mount-ubi-image.html And I reached to the step where I ...