Questions tagged [linux]
These questions are about Linux in general – NOT specific to a particular distribution. If the question just happens to be in a Linux environment, please specify your Linux distribution in the body of your question, but do NOT use the “linux” tag.
39,075 questions
-2
votes
2
answers
34
views
Copying directory into sub directories in linux
I have a directory MAIN with approximately 1200 files ending with .bam. I want to copy these files from MAIN to "/path/to/output/folder" but in sub directories having 50 .bam files each. So ...
0
votes
1
answer
19
views
Where does dnf-5 (Fedora 41) keep its transaction history?
Every night, my Fedora systems run a crontab script that does dnf update -y.
It is actually a small Perl script that also tries to run rkhunter --propupd if necessary.
I used to be able to check the ...
0
votes
2
answers
17
views
How do I redirect the output of mongorestore to a log file?
Here is the command I'm trying to redirect the output of:
$ docker exec -it container sh -c 'mongorestore --archive' < ~/db.dump
I attempted to just do:
$ docker exec -it container sh -c '...
0
votes
0
answers
29
views
Why does setting sysctl -w get overwritten back shortly?
Ubuntu 22.04
I'm new to Linux and try to configure IPv6 network. So I set
sudo sysctl net.ipv6.conf.eth0.accept_ra=2
The problem is it gets immediately overwritten back to the value 0. Why is that ...
4
votes
1
answer
265
views
How to determine what is opening tmp files when I invoke a subshell with ksh
I'm experiencing extremely sluggishness in opening subshells (by using ` ` or $( ) command substitutions in scripts) while in ksh on some Linux servers. The same problem does not exist in sh or any ...
0
votes
0
answers
6
views
Configuring 2 UVC Gadgets with UDC controller
We are testing the use-case of delivering 2 UVC streams from the qcomm SoC. Should the hardware allow this feature? I have enabled 2 gadgets, but when I activate the second one, I get resource busy ...
0
votes
0
answers
32
views
Allow login over SSH, but not local password login
I'd like to allow a user to log in over SSH using a public key, but not allow this user to log in from the local console with a password. Is there any way to do this?
A workaround is setting an ...
0
votes
1
answer
72
views
How exactly are results being passed among processes via the pipes?
So Unix follows a uniform approach to I/O that allows programs to connect via pipes. I also know that to do that it uses file descriptors. But I heard someone saying that pipes allow attaching the ...
2
votes
0
answers
44
views
Only 16 ttyUSB devices created for 32-port USB to RS-232 device
I recently purchased a Coolgear USB-32COM-RM 32 Port RS-232 USB-to-Serial Adapter connected to a Thinkpad T490s running Mint 21.3. Some lsusb output:
# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux ...
-3
votes
1
answer
43
views
All Logs written in /dev/null
I have a few Server hosted by x and y. How can Id deactivate anything about logs. I will connect via a VPN Service like OpenVPN or Wireguard. Also I want to connect to the Server with SSH. On this ...
0
votes
0
answers
28
views
The "find" command does not return the txt file [closed]
I have created a txt file inside a folder. I am running a search query in the parrot terminal to find that file. But the search query does not show me where the file is or the file.
The command I use ...
-1
votes
0
answers
22
views
CloudLinux boot error
Is anyone able to help me interpret what this error means? It was preventing me from booting the server. I have run fsck /dev/sda1 and loginctl terminate-session 1 which seems to have worked but I've ...
0
votes
1
answer
17
views
CUPS Webinterface Time Format
On my CUPS (UNIX/Linux Printing System) Webinterface, let's say:
http://192.168.0.2:631/jobs/
it shows a printjob currently being processed as follows:
processing since Thu 12 Dec 2024 08:21:13 PM ...
0
votes
0
answers
6
views
Bluetooth Keyboard Not Appearing in Pop!_OS
I recently purchased the Pebble K2 380S Bluetooth keyboard and I'm having trouble getting it to pair with Pop!_OS. I've followed the usual steps to troubleshoot Bluetooth connections, but the keyboard ...
0
votes
0
answers
9
views
Custom Linux No /dev/video0 for i2c camera decoder
I am trying to use tw9990 connected to a ATSAMA5D29 to play a camera feed. I have a custom board where the digital data lines are going to the ISC lines of the processor. I have an embedded linux ...
0
votes
0
answers
14
views
How to configure persistent packet filtering (SMTP, Telnet) on 3 Linux Ubuntu instances on docker? IP Tables rules do not apply or are too restrictive
Problem:
I have to configure 3 Linux instances that run on docker containers on OpenStack.
Routers: Rout, Pout, Mout
Rout - should block SMTP & Telnet connections that come from HostR1 on ...
1
vote
2
answers
28
views
Two files with different contents in the linux overlay file system have the same inode
I'm learning about the linux overlay file system and I'm having a problem that's beyond my knowledge. Can anyone explain the technical rationale behind this?
mkdir ./{merged,work,upper,lower}
echo &...
0
votes
0
answers
19
views
Hit noise when playing part of wave file with ALSA PCM interface
I am working a WAVE file playing with ALSA PCM interface in Linux, and I heard noise when I played the file quickly and partially.
Here is my playing function.
static int playback_function(uint8_t *...
3
votes
1
answer
116
views
Write the contents of a .conf file into a variable located in a separate .conf file
I am configuring my hyprland.conf file and I am attempting to do it in a clean and modular fashion. I am trying for a modular fashion so that I can share my dotfiles and someone else can change which ...
0
votes
2
answers
103
views
How to sum all disk size in Linux?
We have some Linux servers with several disks.
[root@xxxxx~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 ...
0
votes
0
answers
9
views
Udev not triggering a new process upon event trigger
I don't know if I'm checking the details incorrectly or something.
I have a udev rule that triggers some_process.service.
I see the logs through sudo journalctl -u some_process.service
When i trigger ...
0
votes
0
answers
41
views
Is there a way to use linux "find" and filter if specific process was the only one accessed it? [duplicate]
I am trying to find out a way to do incremental antivirus scan. My current approach under evaluation is using "find". You can see relevant question here: Is there a reason why I can't ...
1
vote
0
answers
19
views
Why is the PAM configuration not working properly?
I attempted to edit the /etc/pam.d/su file to achieve the following:
When the current user is userX and executes su userM, no password is required. I used the following configuration:
auth [success=...
0
votes
0
answers
11
views
Configure signal strength for Network Manager and APs with the same SSID
In my distro, wpa_supplicant is used by NetworkManager, but it is fully configured via DBus.
As a result, I cannot specify the bgscan option as described here: https://wiki.archlinux.org/title/...
-1
votes
0
answers
25
views
SFTP setup with multiple users
I am setting up SFTP in a Linux machine. Below are few details on existing folder structure:
/var/home/outbound/
/var/home/outbound/user1
/var/home/outbound/user2
/var/home/outbound/user3
I have ...
0
votes
1
answer
24
views
Trying to sort with getopts with different commands and cannot sort by price
I am trying to sort an inventory list in unix/linux below. I am successful in sorting by name and ID and able to pull up the usage menu but cannot sort by price, even with an "awk" function....
0
votes
1
answer
15
views
Failed to get PTS from live audio stream with ffmpeg in Linux
I am working on audio playing in Linux with ffmpeg-4.4.4.
Now I found sometimes the PTS in the live audio stream is 0, which caused failure of calculating current position when playing the stream (....
0
votes
0
answers
14
views
cgroups v2 and systemd missing memory controller on individual user slices
I have several Rocky 8 systems configured for cgroups v2 with systemd.unified_cgroup_hierarchy=1 set in kernel boot parameters.
On these systems I set something like
systemctl set-property user.slice ...
0
votes
0
answers
25
views
Is WSClock or a variant used in any Linux distribution?
I’ve been researching page replacement algorithms and came across WSClock, which combines the Clock algorithm with working set principles.
Now I have the following questions:
Is WSClock implemented ...
5
votes
2
answers
836
views
Writing file content directly to user space
When reading the content of a file using a syscall like read,
why does the kernel first copy it to a kernel buffer
and then to user space, instead of directly copying it to user space?
I understand ...
0
votes
1
answer
27
views
How to use the copilot key to do something in a window manager?
I use every single key on my laptop keyboard, with not one to spare.
I recently got a Thinkpad T14 gen 5, which has a copilot key where PrtSc used to be. I was hoping to rebind the copilot key to be ...
0
votes
0
answers
15
views
Declaring a bind mount in systemd-controlled initrd and persisting systemd attributes for the mount into the system
I know my title is a little bit convoluted so let me explain what I'm doing here in more detail. I am using a ephemeral root setup on my machine, essentially meaning that my / mount is a tmpfs and ...
0
votes
0
answers
20
views
`du` reports wildly different sizes for the same folder depending on arguments [duplicate]
While working on a Seafile server migration, I noticed my rsync of the data took quite a bit longer than I calculated it should. I ended up noticing that some of the directories were already bigger on ...
0
votes
0
answers
13
views
How can I enable support for the HMAT table?
I have access to a server and want to check its HMAT table.
However, the HMAT table is not present (the SRAT and SLIT are though).
I checked the Linux kernel config and the HMAT is enabled (...
0
votes
0
answers
23
views
What does a high percentage of dirty blocks mean when using lvmcache in writethrough mode?
Running lvdisplay usually shows "cache dirty blocks" to be 0%. I had to force-shutdown my computer and soon after starting up it was at 99%, and is dropping slowly.
My understanding is that ...
0
votes
1
answer
32
views
magic numbers in *.d folders
I'm wondering, what is the meaning of magic numbers in filenames in configuration folders? For example, 50 in
/etc/apt/apt.conf.d/50unattended-upgrades or 52 in
/etc/apt/apt.conf.d/52unattended-...
0
votes
1
answer
25
views
Linux Off-path ICMP Fragmentation Needed Injection Attack to quic-go library
I was looking at CVE-2024-53259, where an attacker can inject ICMP Fragmentation Needed message to a host with QUIC connection using quic-go library. The cause is quic-go setting IP_PMTUDISC_DO socket ...
1
vote
0
answers
30
views
U-Boot tftp is much faster then linux tftp
I am using bitbake to generate my u-boot and linux images. I have two boards, one of which is running a simple TFTP server written in c++ code.
U-Boot can tftp boot ~50MB in around 7 seconds. When it ...
1
vote
0
answers
12
views
Kernel Oops happened in hci_send_acl() in Linux
I am working on an embedded Linux system (kernel-5.10.150), there is an bluetooth+WIFI module in system.
By wifi+BT testing, I found there is a kernel oops as follows,
[ 101.717826] CPU 0 Unable to ...
0
votes
0
answers
28
views
Setting thresholds for disk I/O metrics like wr_sec/s or rd_sec/s from sar command
We have a Red Hat Kafka servers, and the disk utilization on the Kafka disk is very high almost 100%.
What we observe from the sar command is that the values of rd_sec/s and wr_sec/s are high.
The ...
0
votes
0
answers
64
views
Linux ls shows some abnormal files with “?” No message of desired type
Help me understand the following problem - there is software that interacts with files in XML format.
The software is wrapped in a docker container. When the software works with the file, the error &...
-1
votes
1
answer
24
views
How can I invoke Steam for Linux in GDB *via its `.desktop` file*?
Problem
steam-1.0.0.82-1.fc41.i686 from RPMFusion is crashing for me upon startup (when invoked from $HOME/.local/share/applications/steam.desktop). An example of this is visible at youtu.be/...
0
votes
1
answer
22
views
open source PXE boot for Linux?
On a simple LAN if I have server A that is running RHEL-8.10 installed from rhel-8.10-x86_64-dvd.iso or similar which then has a service that allows servers B..Z on the LAN to PXE boot from? What ...
1
vote
0
answers
16
views
SSL certa sha changed, but Chrome still uses old one
I was forced to change ssl certificate for one from my domains. So, cert changed, sha256 changed. Old cert was not expired yet, but it's now replaced with new one.
But, it looks like Chrome does not ...
0
votes
0
answers
18
views
kworker/u16:4+flush-252:4 slows down the system, is it a fragmentation issue?
If I restore a tar archive or do any other bulky filesystem operation I observe kworker running at close to 100% CPU utilization and operations which was done in 10-15 minutes takes a week. When the ...
6
votes
1
answer
719
views
bash pipe loses data when command crashed
Consider this simple program (abort.py) that writes some text to stdout and stderr and then crashed (abort()).
import os
import sys
print("end stdout")
print("end stderr", file=...
0
votes
0
answers
37
views
What is the purpose and difference of PGD, PUD, PMD, and PTE entries involved in paging?
As I understand it, a 48-bit virtual linear address's top 36 bits is split into four groups of 9 bits which each virtual linear address is indexed. Going from PGD, to PUD, to PMD, and then to PTE.
...
0
votes
3
answers
48
views
Terminal hangs while writing into a FIFO file [closed]
I have a program running under a systemd service and I'd like to pass some text/commands to it, so I tried doing so with a FIFO file:
.service file
[Unit]
Description=A Minecraft server service!
[...
1
vote
2
answers
23
views
Failed to core dump with send_sig(task, SIGSEGV, 1) from Linux kernel
I am working in an embedded Linux system, and now I want to trigger a core dump from within kernel by using send_sig(task, SIGSEGV, 1).
There is a process A having 10 threads, occasionally, there is a ...
1
vote
1
answer
36
views
Linux extract .zip and preserve all original files timestamps (created/modified/accessed)
It's possible to restore original file timestamps during extraction on linux? I'm tested .zip extraction using 7z, unzip, unar, but only modification date is restored.
Environment:
Linux Mint 22
...