Category "linux"

Valgrind shows question marks

I have compiled a program using Code::Blocks. I have turned on "produce debugging symbols" under the "Debug" target, and also turned off "strip all symbols..."

Print the numbers 1 to 100 using 5 semaphores and processes

I have an assignment to write a program in c language that will print to the shell the numbers 1 - 100. I must use 5 processes. The first one will print 1, 6, 1

what does shutdown -p command do?

In Linux, what does shutdown -p command do, will it directly power off the system without Halting? if it halts the system first then power off, then can we dire

x2go resolution from windows client

I'm happily using x2go to connect to a remote Ubuntu Server 16.04 with XFCE installed from my local pc with a local resolution of 1920x1080 on a HiDPI screen (1

nfs mounting problem VFS: Unable to mount root fs via NFS

I am not able to mount nfs, my Parameters are like following, it is from bootlin; setenv bootargs 'console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.0.1:/nf

libtorch and pytorch cannot be installed simultaneously?

I am learning to develop with PyTorch as well as LibTorch. I have the following line in my ~/.bashrc for dynamic linking of libtorch libraries: # libtorch linki

File update not reflected in browser

I'm using Firefox and use console.log quite a bit. It just got updated to version 100, might have something to do with it. But now files updates stop appearing

Linux - multiple command execution using semicolon

I have a scenario where I need to execute date command and ls -lrth|wc -l command at the same time. I read somewhere on google that I can do it in the way shown

Trying to install TA-lib

I'm using gcp debian VM, and trying to install the module TA-lib doing this (with the tar already downloaded): $ tar -xzf ta-lib-0.4.0-src.tar.gz $ cd ta-lib/ $

Disable gdb highlight colors

I'm using gdb on Fedora 32 and gdb prints information with highlight color. However the color has less contrast for example dark blue text on black background.

Pycharm and sys.argv arguments

I am trying to debug a script which takes command line arguments as an input. Arguments are text files in the same directory. Script gets file names from sys.ar

Get Linux file descriptor of FileChannel

Is there a way to get the Linux file descriptor for an opened FileChannel? I need it to call mount.fuse -o fd=... (for implementing FUSE). As a hacky workaround

How to generate trace on armv8 Linux - CoreSight ETM - NVIDIA DRIVE AGX

I'd like to analyze worst case execution time of the programs. For this, there is a tool and expecting trace output of the program(specifically CoreSight - Embe

Terminate sudo python script when the terminal closes

How can I tell if the terminal running my python script was closed? I want to safely end my python script if the user closes the terminal. I can catch SIGHUP wi

IP tables TEE command changes source mac address

I am trying to forward/clone traffic from my host machine to my docker container using IPtables command. I am able to receive traffic inside my container via ip

Processing text in bash - extracting the volume of a program from pactl sink-inputs output

Looking for a way to extract the volume from pactl list sink-inputs Output example: Sink Input #67 Driver: protocol-native.c Owner Module: 1

list of logged in unique users in linux

I am working in linux environment as a non root user. I am using users command to get the logged in users users But it returns the user names multiple times

How to use Different Java versions eclipse in Linux mint?

I have many Java versions installed on my laptop. $ sudo update-alternatives --config java [sudo] password for naruto: There are 3 choices for the alternative

how to fix startup script for aws ec2, to display hello world, other meta data from 169.254.169.254

I am setting up new EC2 instances, and I want to be able to see hello world, the AZ and the IP address displayed. It only shows the apache start page. I have

CMake set environment variable

According to the CMake documentation https://cmake.org/cmake/help/v3.3/command/set.html One can do set(ENV{<variable>} <value>) but this gives the