Category "linux"

Save modifications in place with awk

I am learning awk and I would like to know if there is an option to write changes to file, similar to sed where I would use -i option to save modifications to a

how to print out all commands in bash script [duplicate]

I know "set -x" will print out commands in current script. but if the script a.sh runs b.sh then b.sh won't print out commands. is there a way

Building kernel with `-save-temps`

I'm building the Linux Kernel with the gcc options -save-temps in order to see exactly how all the C files get preprocessed. I followed the instructions here, b

Should PATH contain directories or full paths to binaries?

I am trying to set up a correct PATH, but I'm wondering what it should contain. If I have /usr/bin/ls /usr/local/bin/ls and I want to prefer the one in /usr/

Linux custom init and SIGTERM

I try to build my own init with rust language. this is my example code : use std::process::Command; fn main() { loop { println!("Welcome to custom

(solved) C++ Load one Shared Object with dependencies and access their functions

OS Linux Ubuntu 18.04, gcc 7.4.0 A program should load one SO which is dependent on other SOs. All exported functions of all SOs should be called by the program

Listing screen sessions cause errors - Raspberry Pi

I am connected to a Raspberry Pi through SSH on my MacBook. Within the SSH, I have used the screen command to create two detached instances of the shell, one in

When trying to run sudo apt upgrade on my terminal in zorin 16 os, I get an error code (2). How can I solve this?

Preconfiguring packages ... dpkg: unrecoverable fatal error, aborting: files list file for package 'sublime-text' is missing final newline E: Sub-process /usr/b

ModuleNotFoundError: No module named 'apt_pkg' installing deadsnakes repository

I want to install Python 3.10 on Ubuntu 18.04 (I'm currently on Python 3.8) from the deadsnakes repository with the following set of commands I found on the int

How can I create Linux Mint widget?

Apologies for posting here, but I seem to be unable to find any information/tutorial on creating simple widgets for Linux Mint xfce desktop. What I need is a si

how to Increase open files limit in Jenkins

I would like to increase the max of opening file in Jenkins job, where I use a username called jenkins. So from the server where jenkins is installed the limit

To replace a immediate text after pattern match in Linux shell using sed

Content of a json file "iso_checksum": "md5:32fdf4fef4ef" I have stored value of new checksum in a variable v = "4dfv45ffdf" I want to replace the value after

Process swap usage with use ID

I've been trying to get a one liner working updated to add the user name for the processes consuming swap on the system but having a hard time getting it to wor

Git repository for multiple Linux users

after reading some of topics I still cannot find solution for this problem. Lets say this is my infrastructure: Two types of servers: dev and prod Two types of

Powershell running .NET Core on Linux RedHat giving SSL error connecting

I am currently trying to use dotnetcore to run a script over Powershell. This script uses a library that will authenticate with Azure using a service principal

Why are "--slave" and "--no-restore" being used by commandArgs when I call my R file with Rscript

I am running an R script using Rscript from the command line (linux) like this: Rscript myscript.R inputfile1.csv inputfile.csv integerArg My command args are

bash output with extra newline within the string

I use the following command to output PID and FD related to CLOSE-WAIT sockets. sudo ss -p | grep CLOSE-WAIT | awk '{ print $7 }' | sed 's/,pid=/ /' | sed 's/,f

Converting Makefile to CMake cannot find linked shared object

I am attempting to convert a working Makefile into a CMake and need a little assistance. I am trying to cross compile a small program for a yocto device from a

How to set LD_PRELOAD in systemd

I want to hook some functions in libssl with LD_PRELOAD in systemd. In systemd file I put ExecStart=/etc/myscript.sh and in /etc/myscript.sh I put #!/bin/sh LD

Cant find the background apps tray in Pop!_OS

All apps like "Steam", "Slack", "Anydesk" and etc. They were all displaying in black/white in a tray at my panel. The update for POP!_OS was pending for a few w