All Questions
229,397
questions
0
votes
0
answers
21
views
Error with g++ when compiling opencv nix package
Here is my error when i try to install the opencv nix package:
/nix/store/3mn8a8v7l7kypl9bah0xwymyp6080kn9-opencv-4.5.4.drv
building '/nix/store/3mn8a8v7l7kypl9bah0xwymyp6080kn9-opencv-4.5.4.drv'...
...
0
votes
1
answer
34
views
How to use gettimeofday in the kernel module?
I'm trying to use the following code in the kernel module
struct timeval now;
gettimeofday(&now, NULL);
But getting following error while compiling kernel
drivers/media/i2c/ox05b.c:776:17: error:...
0
votes
2
answers
33
views
BusyBox's tar --exclude doesn't exclude
Extract a tar file with content dir1/dir2/file, using --exclude dir2 switch. The gnu tar excluded but busybox's tar doesn't.
Use --exclude dir1/dir2 works fine, but why? Is there a way to exclude any ...
0
votes
1
answer
21
views
Clearing log files located in var/log (RHEL)
I am investigating the retention of logs in var/log/ for a server that hosts Gitlab.
There are multiple logs here as listed below:
Boot.log
Cron
maillog
Messages
Secure
spooler
yum.log
Is there a way ...
0
votes
1
answer
39
views
Unable to compile uvcvideo driver
I've been following the LFD103 course titled "A BEGINNER'S GUIDE TO LINUX KERNEL DEVELOPMENT". In the section "Writing Your First Kernel Patch", we make changes to the 'uvcvideo' ...
0
votes
1
answer
38
views
WSL2 Ubuntu: How to start ssh-agent and add ssh key automatically on each terminal start up
I'm using WSL2, on Terminal, with Ubuntu installed. I have added the following to my .bashrc:
# Start ssh-agent
# check if ssh-agent is already running
if [ -z "$SSH_AUTH_SOCK" ]; then
#...
0
votes
1
answer
33
views
Unrar all .rar files in a directory to a folder with the same name
Here is an example of what I am trying to do:
I have a folder (called 'dir') that contains the following:
dir
|_sub1.rar
|_sub2.rar
|_sub3.rar
I will cd ~/ to dir and want to run a command that will ...
4
votes
3
answers
634
views
Converting epoch time format saved in a text file to human friendly format
I have a file name simcloud-target.txt where dates are saved in epoch time format i want to convert all the dates to human friendly format and print it as a list (same as the out put shown below so ...
0
votes
1
answer
38
views
ssh EOF in bash script - how to store value of command?
I need to basically copy only the last created folder in a directory of many folders within an SSH session. I have the correct find command to do this, but I just can't seem to store the result within ...
0
votes
0
answers
27
views
Headphones are detected in Ubuntu only after booting once from Windows
I am having a weird problem while using my headphones (3.5 mm jack). It is a dual boot Razer Blade 15” laptop having Windows 10 and Ubuntu 18 installed.
In Windows 10, I noticed that with the windows ...
0
votes
3
answers
58
views
How to delete all text before and when string occurs on sed
I remembered how to do this and even learned it from Stack Exchange, but forgot how I googled it so now I can't find it. The answers I am finding now are not what I'm looking for. Here is an example ...
0
votes
0
answers
28
views
Downloading website via wget only yields index page
a friend has asked me to make some small modifications to a website for him. I'm familiar with HTML & CSS, but turned to wget as an initial way to accelerate the process.
Right now, only the index ...
0
votes
1
answer
38
views
Help with -maxdepth in 'find -exec mv' command line
I'm working on a sorting/filtering cron script to process incoming files based on a set of constant strings (logfile, history, dataset, etc). The files to be sorted all sit under a common folder, some ...
1
vote
1
answer
66
views
-bash: /usr/lib/oracle/19.10/client64/bin/sqlplus: No such file or directory
I'm trying to run Oracle Linux 9(aarch64) on M2 MacBook Air using UTM, so that I can develop my python application that is required to connect to Oracle Database 11g.
Because the python app requires ...
22
votes
3
answers
2k
views
rsync the file `a`b
Yeah, I know what you are thinking: "Who on earth names their file `a`b?"
But let us assume you do have a file called `a`b (possibly made by a crazy Mac user - obviously not by you), and you ...
0
votes
0
answers
36
views
How to firewall a network namespace using firewalld?
I'm running fedora 36 using firewalld as my firewall.
I set up a network namespace called "wireguard". It contains the interface wg0 which connects to Mullvad VPN. I set it up like this:
ip ...
3
votes
1
answer
56
views
systemd $HOME environment variable different from expected
I have a service that runs as root:
[Unit]
Description=my service
After=docker.service network-online.target
Requires=docker.service network-online.target
[Service]
TimeoutStartSec=0
RestartSec=60
...
-1
votes
0
answers
29
views
how to process reading a file and extracting values
I have file (yaml):
env:
- name: dev
repo: dev
scope:
- scope1
- scope2
- name: prod
repo: prod
scope:
- scope2
- scope3
I would like to process the file and extract ...
0
votes
1
answer
18
views
How can I configure shutdown, reboot etc. to display a message on an old (2.6) Linux?
I have an old embedded control system that still uses a 2.6 kernel and runs Debian 4.
I am looking for a way to display a message whenever the superuser calls (interactively) reboot, shutdown, ...
0
votes
1
answer
32
views
How to copy directory with rsync to remote USB pen drive correctly
How to copy dir-tree form Debian 11 to remote pen drive in a way, that I can restore this directory to the OS without any permission modifications?
A usb pen drive is mounted to /home/<user>/mnt ...
-2
votes
0
answers
32
views
Create a script to invoke vi to find and delete lines in a file
I am trying to edit a file (file.xml) on a linux host using vi but I would like to script it.
The goal is:
vi file.xml
/string_of_interest (search string of interest)
dd (delete that line)
:wq (write ...
0
votes
2
answers
50
views
curl for website without intermediate certificate
I need to make request to website using curl, but website has does not provide intermediate certificate in tls.
What I mean:
When connecting to server using TLS, it MUST (rfc5246 F.1.1, rfc5246 7.4.2) ...
-5
votes
2
answers
50
views
Unix: how to get number of days from a given date like 10Dec2022
Team,
Can someone help find code for below..
Unix: how to get a count of number of days from a given date like 10Dec2022 to today.
Looking for Answer: 102 as of (22Mar2023)
0
votes
0
answers
18
views
Hotswapped NVMe drives show in lspci but not in lsblk
I'm messing around with NVMe hotswap on my Oracle X8-2L. I have a number of NVMe drives that are connected to the server before boot and then a number of NVMe drives that will be connected after the ...
0
votes
1
answer
44
views
Solving gpg: decryption failed: No secret key
I have encrypted a file through gpg ***.gpg --encrypt --recipient ...@mail.com ***
The hard disk with my Linux system where such file was encrypted has dead. I keep just the ***.gpg file in an ...
0
votes
0
answers
16
views
VS Code Won't Recognize R Installation
I installed R via the commands at this website. Running R in terminal works properly; running which R returns /usr/bin/R. VS code cannot find R despite the path for rterm and rpath being given ...
0
votes
0
answers
13
views
how to change a var env value with nix
here is my default.nix:
with import <nixpkgs> {}; {
cimgEnv = stdenv.mkDerivation {
name = "cimgdev";
buildInputs = [ pkgconfig stdenv cimg xorg.libX11 boost jdk gradle (opencv4....
0
votes
1
answer
29
views
How to use an alternate toolset in rpmbuild
I am trying to compile & package the latest version of Zeek (5.0.7) for rhel 7 servers. I get an error saying the "cxx17" is required. Searching the web, I found that it is contained ...
5
votes
0
answers
49
views
How to guarantee temporary immutability of LVM2 LV at raw block level?
I inherited an Azure VM (Ubuntu 20.04) which has a 7 disk VG fully occupied by a RAID5 LV formatted as ext4.
I need to take backups and was hoping to use Azure Backup to snapshot the Azure Disks ...
2
votes
1
answer
34
views
How to retain color output with custom zsh function?
I am setting up a zsh shell environment and I wanted to try writing a simple function for my own learning purposes:
# ~/.zsh-extensions/conda_which
# get version in conda env
function conda_which {
...
0
votes
0
answers
12
views
GRUB2 serial console issues on NVMe-based pc
I want to interact with GRUB through a usb-to-serial converter.
I was able to achieve this on my laptop by using this list of commands in grub's cli:
insmod nativedisk #to not loose drive information ...
0
votes
0
answers
19
views
3-Port Network Bridge for Single Pair Ethernet
i have two SPE network Interfaces and want to bridge them to a bridge with both of them + a interface which i can use for my linux environment.
I created a bridge with both interfaces and set them ...
0
votes
1
answer
34
views
Permission denied with locate command in Shell Script in Oracle Linux?
I am trying to run a shell script that contains the command
$locate /etc/*.conf
to find all files in /etc/ that end in .conf, but whenever I run the script the command line says /etc/chrony.conf: ...
0
votes
0
answers
23
views
Restrict users to create files on Samba share by file extensions
I'm having a network of users where all windows machines have a samba share attached. These users are not allowed to share specific files with file extensions like ".bat" or ".ps1"....
0
votes
1
answer
32
views
What Linux distros support mmap_shared?
I found a man page for a function called mmap_shared on die.net: https://linux.die.net/man/3/mmap_shared
It looks like a convenience wrapper function around mmap, however it doesn't seem to be ...
0
votes
3
answers
60
views
Using "sed" to insert text at the end of a field in TSV file
I want to insert characters in TSV files using the sed command with wildcard expressions:
I have a file like this:
Marker Pvalue Trait Chr Pos
S3_16887238 6.172847e-09 Total_Soil_S 3 ...
0
votes
1
answer
36
views
Why newly created mirror repository is not working as source one
I'm using RockyLinux 8.5 on my test server and i want to create local repository for some applications as i won't have internet access in real case, only local repos.
I've downloaded package with it's ...
2
votes
2
answers
46
views
How to refresh decoy data on a plausible deniability dm-crypt scheme?
I just read this discussion between Linus Torvalds and (among others) Milan Broz, one of dm-crypt's maintainers.
I am intrigued by the the following part of the discussion :
Linus Torvalds:
I thought ...
0
votes
0
answers
22
views
site does not exist for a2ensite
during the koha installation process i told ubuntu to sudo a2ensite library
and got the message ERROR: Site library does not exist!
i looked it up and found here that i might have to rename the file ...
0
votes
0
answers
30
views
How do I get Bridge to share IP with a client?
Router ----[eth0 TAP eth1]---- Client (10.0.0.10)
As above, there is a Linux device named TAP.
This device acts as a bridge (br0) and passes through the packets of Clients.
In this configuration, in ...
2
votes
1
answer
52
views
Where is timedatectl information stored?
I am working on an embedded system without RTC battery. The time is synchronized via NTP when internet connection is available (which does not always happen). When the device is shut down, the time is ...
0
votes
0
answers
38
views
Debian Bookworm: Install Python after PEP 668
I have basic Debian bookworm and/or sid images. I would like to install Python in these using apt. Even a simple apt install python3 does fail saying
error: externally-managed-environment
× This ...
1
vote
2
answers
35
views
How to move every three day file based on the filename to respective folders in bash
I have several files like these:
2020.001.00.01.pcc1_TBTZ_TBTZ_1.0-3.0.sac
2020.001.03.04.pcc1_TBTZ_TBTZ_1.0-3.0.sac
2020.002.00.01.pcc1_TBTZ_TBTZ_1.0-3.0.sac
2020.003.00.01.pcc1_TBTZ_TBTZ_1.0-3.0.sac
...
0
votes
1
answer
46
views
Is it possible to create such a tool that allows to save a being read text from a PDF reader into a string for handling this text afterwards?
The Linux Mint has a tool for PDF reading that is called the "Xreader" and installed by default together with the operation system installation.
Is it possible to create such a tool that ...
0
votes
0
answers
21
views
How to update Samba to 4.16 (in /usr/local/samba)?
I use Samba domain controller on my Ubuntu (18.04.6 LTS) server. Samba is installed in /usr/local/samba folder. Samba version is 4.10.16 and I want to update it to 4.16 (due to Windows 11 22H2 problem)...
1
vote
2
answers
40
views
zsh completion: complete block devices in /dev
for my script, I need to complete block devices in /dev, so that when I do
my_script.sh <TAB>
it will complete /dev/ and offer me all disks that are listed in /dev (not in subdirectories). So ...
0
votes
3
answers
46
views
I can't connect to x11vnc from different network
I am trying to connect from my laptop (with Linux Mint) to my remote desktop (with Linux Mint too) using VNC Viewer on my laptop and x11vnc on my desktop. I manage to connect if I am on the same ...
1
vote
0
answers
27
views
Failed to play sound: Invalid state
I'm running on Arch Linux with gnome and Pipewire.
I have the strange issue, that when I want to play sound I get the following error message:
(gnome-control-center:4636): sound-cc-panel-WARNING **: ...
0
votes
0
answers
16
views
upgrade grub 0.97 to grub2 in opensuse 11.3
I want to update grub on my opensuse 11.3 machine from 0.97 to grub2
this is how it looks like when i invoke grub-install
can anyone help me out here on how to upgrade to grub2
vm@machine:/usr/sbin# ...
0
votes
0
answers
18
views
How do I install ntp server on windows and ntp client on Debian and configure them both?
I have Configured Ntp server on my windows including the registry edits, services edits, and firewall. I started the time service too. I connected a debian system to the same network and configured it ...