Questions tagged [linux]
NOTICE: All Linux questions must be related to programming; those that aren't will be closed. 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/
linux
227,965
questions
-2
votes
1
answer
73
views
What does ${USER:root} mean and how to get its value with Java?
We have a Java Spring Boot based program which reads the following line from a property file:
spring.cloud.config.username=${USER:root}
When it runs on Linux server, it's able to retrieve the current ...
1
vote
0
answers
21
views
Syscall tracepoints missing in custom 5.15 aarch64 android kernel for Pixel 6
I recompiled a custom 5.15 kernel for my Android Pixel 6 phone with Android 13 with event tracing enabled (especially syscall tracepoints).
After booting, the kernel does not have the /sys/kernel/...
-3
votes
0
answers
44
views
Output lines from a file that match pattern 1 and not pattern 2 in linux [duplicate]
I have a text file that has a bunch of lines. I used grep to print lines matching pattern 1 to a second file. I want to modify the command to exclude the lines the match pattern 2. So the requirement ...
0
votes
0
answers
30
views
Is it possible to allocate memory with mmap that OS can free as needed?
The Linux OS automatically utilizes free RAM to cache files read from disk to improve the performance of applications. When free RAM is increasingly consumed by private application memory the OS ...
1
vote
1
answer
56
views
What are the binary representations for the flags used in the Linux open() syscall?
I am learning NASM and currently unsure what values should be used for the flags argument for open() as shown in the man page. I'm mainly asking this for clarification so I don't mess something up, ...
0
votes
0
answers
15
views
linux: ls -lash does not show any file unless i cd to a specific subfolder [closed]
I am having troubles to list the content of a folder in RHEL8.
my actions :
cd /path1/path2
ls -lash
-> no files listed - seems empty folder
cd /path1/path2/path3
ls -lash
-> i get files ...
-1
votes
0
answers
40
views
How to fix apt update after to upgrade the mysql.list file? [closed]
I tried to install MySQL Workbench on Ubuntu 24.04 LTS, and after following the steps from the official site, I can no longer run the sudo apt update command. Every time, the following error appears:
...
0
votes
0
answers
38
views
running ./configure returns error: Cannot link with libtool libs! (libltdl)
I am attempting to compile an older program on a new system. I've done this a few times with this same software and I have always been able to find some way to get it to work but this time I am ...
1
vote
1
answer
22
views
types used to store the block size of linux `struct super_block`
struct super_block {
struct list_head s_list; /* Keep this first */
dev_t s_dev; /* search index; _not_ kdev_t */
unsigned char s_blocksize_bits;
...
1
vote
1
answer
34
views
When is late enough to use dlsym to find functions in another shared library?
Say I have an application foo that is linked against bar.so. I have another library, buzz.so that the application does not directly link, but that I use when I run the application with LD_PRELOAD like ...
-1
votes
3
answers
105
views
How to find strings in multiple lines of txt file then add all to new csv line
I have thousands of txt files that were converted from emails that included a "Contact Us" form. I need to find/select strings in the second "column", but the number of lines to ...
0
votes
1
answer
20
views
using nginx host multiple django apps/docker in one server. return to root path not the apps' path
I have a django app. The code snippet for the function load_form(request) in views.py.
def load_form(request):
if request.method == 'POST':
newQAForm = QAForm(request.POST)
if ...
0
votes
0
answers
35
views
Parsing scan code event data received from a character device in Linux
I need some guidance regarding the parsing and de-serialization of binary data received from a character device in Linux. I'm working on writing a program in rust that monitors keyboard input used for ...
0
votes
1
answer
45
views
How to make an App to the default phone app
I am new to Android app development. So I'm wondering what I need to do to make my app the default phone app. If anyone can help me I would be very grateful
Best regards Raphael Schneider
A photo of ...
0
votes
0
answers
14
views
How to add printk statements to debug the conntrack source code on a virtual machine?
I've been trying to understand the connection tracking (conntrack) source code (specifically nf_conntrack_proto_tcp.c and nf_conntrack_proto_udp.c) by sending packets between virtual machines and ...
0
votes
0
answers
36
views
unusual linking time time while using cmake ExternalProject
I'm trying to build a simple CPP project based on Cmake.
My project has a dependency library(Spdlog).
I like to have my dependency library beside my source files locally so that every time I build my ...
0
votes
0
answers
52
views
"AssertionError: Torch not compiled with CUDA enabled" despite having correct versions of everything
I am trying to run a model using cuda on linux terminal with conda virtual environment. The model uses device_map = "auto" for device assignment like the following:
model = ...
0
votes
0
answers
16
views
SFTP Admin User [closed]
I am setting up an OpenSSH sFTP server.
I want to create a sFTP Admin user that can navigate all the folders and move files.
My approach is the following:
Create the other users (let's call it user_1)...
0
votes
0
answers
34
views
Cannot install Ansible Automation Platform offline bundle on RHEL8 servers due to "missing" Python 3.9
I am trying to install Ansible Automation Platform setup bundle (ansible-automation-platform-setup-bundle-2.4-7-x86_64.tar.gz), downloaded directly from Red Hat's Ansible portal.
When I try to install ...
0
votes
1
answer
36
views
Efficient handling of large log files in Linux [closed]
I'm managing a Linux server that generates a lot of large log files, you know. They can be moreover in gigabytes. I want an advanced technique to manage all these.
Viewing logs has been a problem, ...
-5
votes
0
answers
33
views
I am facing one issue as: "File name too long" after running some linux commands. Do you guys have any idea that how can we resolve this issue? [closed]
sudo ./abc.sh --abi arm64 --android_version 33
This is the command which I ran in linux terminal. And I got output as "File name too long".
~/Mainline-related CTS files$ sudo ./abc.sh --...
0
votes
0
answers
21
views
Qtile-extras decorations don't show up
I've recently installed Arch Linux with the Qtile window manager. These days I have been testing and trying to configure Qtile and personalize it. Now I'm trying to add the Qtile-extra's decorations, ...
0
votes
0
answers
33
views
How does DPDK guarantee fixed/pinned physical address for huge pages
According to this DPDK blog, physical addresses of huge pages are "pinned":
Whenever a memory area is made available for DPDK to use, DPDK figures out its physical address by asking the ...
-4
votes
0
answers
23
views
Linux Image not deleting [closed]
This error is bugging me and preventing the installation of packages:
installed linux-image-5.14.0-1052-oem package post-removal script subprocess returned error exit status 1
I was trying to install ...
-2
votes
0
answers
31
views
launching a graphical app on raspberry pi (headless linux) from ssh [closed]
I have developed a python app which uses PySimpleGUI for UI.
The app is intended to run on [Linux raspberrypi 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv7l GNU/Linux] which is ...
0
votes
0
answers
21
views
Containers on swarm cannot communicate between nodes and connect to host network
I'm using docker swarm and deploy services through docker stack deploy.
I have two problems, which probably are connected to each other.
I cannot expose every detail of my configuration, so I created ...
-3
votes
0
answers
25
views
Linux disk space running full [closed]
Trying to understand more of Linux and why our diskspace keeps running full with what.
Little to none experience with Linux so bear with me
/dev/sda2 is mounted on / and this disk keeps running full
...
0
votes
0
answers
11
views
OneLogin VLDAP sssd access filter for user_roles
We are currently using VLDAP and sssd.conf on Ubuntu Linux Systems, so that users can login into these Ubuntu systems using their OneLogin credentials.
Is there a way or configuration that can be used ...
0
votes
0
answers
63
views
rm * -bash: /usr/bin/rm: Argument list too long [closed]
What the simple way to delete session folder files from inside?
the command :
rm *
get error:
-bash: /usr/bin/rm: Argument list too long
Also how i can set cleanup for session directory ?
-3
votes
0
answers
18
views
How can I do sub milliseconds network measurements using iperf3 [closed]
I am working on a network performance project for my Master's thesis, and I need to measure network metrics like transfer speed and latency at intervals smaller than 1 millisecond. The current tools, ...
1
vote
2
answers
77
views
How to delete all files except the last day files in Linux?
Suppose these are my files:
file1 ==> 2024/07/10
file2 ==> 2024/07/9
file3 ==> 2024/07/9
file4 ==> 2024/07/8
I'm going to delete all files, except files which create date is yesterday (...
-1
votes
0
answers
37
views
Format of f_handle in file_handle,
I'm using the struct file_handle to identify a file in an unique way for a fs monitor. I want to know what the format is of the f_handle. The manpage of name_to_handle_at says:
"Other than the ...
-3
votes
0
answers
19
views
I cannot access MISP dashboard [closed]
T-Guard is an open-source unified security solution, and I am in the process of installing T-Guard components. After following all the steps in the setup GUI interface (I will attach a picture) T-...
0
votes
0
answers
30
views
Allocating user space buffer in kernel module fails [duplicate]
I'd like to allocate a user space buffer in a kernel module (linux kernel v5.4.0). According to this post, this should be doable by using do_mmap().
I've written the following code:
#include <linux/...
0
votes
1
answer
21
views
Handling sidekiq service refresh
I am using this linux unit file for our sidekiq service:
[Unit]
Description=sidekiq low
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/var/www/backend/current
Environment=&...
0
votes
1
answer
28
views
I am receiving a response url not found on server when I try to delete file in Google Drive using a Linux bash script and curl
I am trying to delete a file using a bash shell script that I uploaded to a shared google drive using a different shell script. I am able to list the contents of the folder that the file is in and ...
0
votes
0
answers
23
views
starting Milvus after building milvus from source code
I built milvus from source on my database cluster.
For that I followed the simple instructions on the milvus repo readme:
# Clone github repository.
$ git clone https://github.com/milvus-io/milvus.git
...
-1
votes
0
answers
24
views
Ethernet to WiFi Client Communication Failure in Linux Network [closed]
I am trying to set up a network where multiple devices can connect to each other. All devices are running Linux. The network setup includes:
One WiFi Access Point (AP) Host
Multiple WiFi AP Clients
...
0
votes
1
answer
32
views
How to query WebSphere Node Agent status from CLI
Is there any way to get the status of the IBM WebSphere Node Agent from the CLI. I am working on a Python script to automate the status checking, but I haven't found a command (yet) that will help me ...
0
votes
0
answers
13
views
How to serve two laravel projects in nginx server?
I want to serve multiple Laravel apps in a single nginx server, the first one has a root directory in /var/www/html/project1, the second one has /var/www/html/admin, and so on.
Here is the code. Our ...
0
votes
0
answers
50
views
Errors during downloading metadata for repository 'seconion':- Curl error (37): Couldn't read a file:// file for file:///nsm/repo/repodata/repomd.xml
I tried updating the packages in oracle-linux using
sudo yum update
but it is throwing an error
Errors during downloading metadata for repository 'securityonion':
Curl error (37): Couldn't read a ...
-5
votes
0
answers
43
views
Is there a way to run Linux runner on Windows in Gitlab?
I tried to create a Linux runner to run on my Windows system in Gitlab, but somehow it gets changed to Windows when it is created. I wanted to deploy my code to Linux server. Is there a way to resolve ...
1
vote
2
answers
69
views
How to make a real time countdown in Bash while taking user input
i want to take user input and make a real time countdown like the following:
readFile(){
linenumber=1
end=10
while [ $linenumber -lt 18 ];do
for (( i=0; i<=10; i++ )); do
...
2
votes
1
answer
109
views
can I overwrite the malloc called by library functions?
my code (main.c):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void* __real_malloc(size_t size);
void __real_free(void* ptr);
void* __wrap_malloc(size_t size)
{
...
0
votes
0
answers
36
views
Why timeout works differently when executed from terminal vs from a shell script file
I wanted to implement a unit testing shell script file that runs a command, compares the expected and actual output, and also add timeout constraints.
I used actual=$(timeout 2s ./bf --file ./test/inc-...
0
votes
0
answers
49
views
Calling outer program which accesses I2C device with system( ) in Linux, does not work [closed]
first at all, I list the environment below.
Hardware: Raspberry Pi Zero 2w
OS: Raspberry Pi OS (Legacy) Lite
USED Interface: UART, I2C
The scenario is that I wrote a UART server in C to receive ...
0
votes
0
answers
91
views
Reduce CPU usage for cargo run
During cargo run, rustc by default takes up all CPU resources. Is it possible to limit CPU usage? For example, cpulimit -l 40 works for cargo, but rustc processes still use 100% of the CPU.
Fedora ...
1
vote
1
answer
71
views
How can I limit the number of blocks written or read in a Write_10 or Read command? [closed]
Here is the problem: My usb storage device has a 64kB (limited by hardware) buffer used to cache reads/writes which means it can only cache up to 128 blocks(512B) of memory. The SCSI Write-10 command ...
0
votes
3
answers
57
views
Is string.indexOf() treated the same on Linux vs Windows?
I'm not an experienced JavaScript programmer. This is my first project using JS.
I'm developing on Linux and am at the point for my first release. Running the project on a Windows machine I came ...
0
votes
0
answers
26
views
Trying to install Nanoc (with Ruby) on Fedora Linux, but getting an error I can't decipher
I try to install Nanoc on Fedora Linux.
I've successfully installed Ruby using
dnf install ruby
Checked it with ruby -v and made sure rubygems is installed. Also checked version to verify ...