Category "linux"

Delete all old files, but keep newest 4 files using ansible-playbook

I would like to delete all old files, and keep newest 4 files. The output isn't what i expected. Even i use absent on file modules, but it doesn't delete the fi

How to use source command within Jenkins pipeline script

I recently rewrite bash execution command into Jenkins pipeline. The old code is like ... source environment.sh //Build //Test ... Now I use pipeline script

How to automate installation of missing GPG keys on Linux

I've been working with Linux containers for several years. I am surprised that I wasn't able to find a thread about this question. Scenario: I've just added a n

System malfunctioning after uninstalling python3

I use Parrot OS v4.7, there was an issue with Pyinstaller (Dependencies problem but all the dependencies were fulfilled/installed) so I googled and tried to un

Can two processes running simultaneously share a variable?

Newbie here, I recon this may be a very foolish question. I am simultaneously running on cuda, in two distinct processes, a simple 3-layer MLP neural network ov

How to read TCP packets on a tun/tap interface?

I'm working on a simple project that listens on a tun interface and modified the packets then re-sends them to the real interface. I have tried songgao/water,

Issues installing gdal-bin (libmysqlclient21 dependency) on 20.04.3 (databricks job clusters)

I've had, in the past, gdal utilities installed successfully on a Databricks Cluster running 20.04.3 LTS (focal). $ cat /etc/os-release NAME="Ubuntu" VERSION="2

gcc cross compiling for raspberry pi /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found

On Ubuntu 22.04 LTS, I'm cross-compiling for raspberry pi. When I run any built executable on the pi, I get this linking error: /lib/arm-linux-gnueabihf/libc.so

How to select a specific input device with PyAudio

When recording audio via PyAudio, how do you specify the exact input device to use? My computer has two microphones, one built-in and one via USB, and I want t

What is the benefit of calling ioread functions when using memory mapped IO

To use memory mapped I/O, we need to first call request_mem_region. struct resource *request_mem_region( unsigned long start, u

Linux - How to count occurrences of character 'i' in a word (not a file)

How can I print the number of occurrences of "i" in Pneumonoultramicroscopicsilicovolcanoconiosis? How can I approach this with the commands grep and wc?

No cursor motion capability occurs when startup linux script execute minicom script with at commands

I have created a startup Linux script for a board that runs Debian jessie Armbian 8.1. I need at startup to run at command in a modem attached to it via USB int

Linux Time Zone Warning

I'd like to know the meaning of the alert message that occurs in the Linux time zone. timedatectl Warning: Ignoring the TZ variable. Reading the system's time

how to query sar(sysstat) for more than one day data points

I don't see 'sar' command accepts date-and-time as starttime(-s) or endtime(-e) than just time. So, how to query 'sar' for more than one day's data points by pa

Flutter Doctor shows problem with GTK 3.0 for CentOS Linux 7 running on Doctor

Goal: Compile and run flutter examples emulating Linux Desktop on CentOS 7 docker container (Note: Can't use snapd - not supported within Docker) Installed m

How to read a .txt file from terminal, and then extract contents from file?

I am wanting to use C++ to extract the contents of a .txt file (that will be pointed to from the terminal) that is to be parsed, but I am not sure how to go abo

Error when building ios application using fastlane remotely

i am trying to fix an error which i get when i try to ssh into mac-mini and run fastlane remotely. The following build commands failed: CodeSign /Users/ec2-user

Using curl in a bash script and getting curl: (3) Illegal characters found in URL

So I have a very simple bash script that is curl'ing to an auth server for a header. The header url is written to a var and then used in the next curl call. Whe

How to schedule a cron for the first Thursday of every month

I need to schedule a cron job to run at 3:00 PM on the first Thursday of every month. How can I do this? I have read another topic similar to this, but it is fo

Why Input/Output Error occurs when use ls command in my fuse filesystem?

Why I/O Error causes when I tried ls . command in my fuse filesystem? My filesystem has a limitation that it only allows mail address type as individual filenam