Why does "pstack" only print one thread's content?

Linux
My OS is RHEL 7, and I run a simple Go program: package main import ( "time" ) func main() { time.Sleep(1000 * time.Second) } During it...
1 year ago

Any way to specify the location of profile data

Linux
The default the profile file is from the executable is run and the file is called gmon.out. Is there any way to specify a new location? I'm using gcc...
1 year ago

python error "AttributeError: 'module' object has no attribute 'sha1'"

Linux
i need your help, How to correct an error AttributeError: 'module' object has no attribute 'sha1', When I start the command example import random o...
1 year ago

GCC Warning: pointer arithmetic with type void *

Linux
I have to write a function, in C on Linux, to read or write generic data. I can read (or write) big data so i made a while using how many bytes I rea...
1 year ago

Is there a way for non-root processes to bind to "privileged" ports (<1024) on Linux?

Linux
It's very annoying to have this limitation on my development box, when there won't ever be any users other than me. I'm aware of the standard workaro...
1 year ago

qmake conditional for raspberry pi

Linux
I'm trying to make a qmake .pro file to compile in raspberry-pi (not for cross compile) y can use conditionals definitions depending of the platform: ...
1 year ago

Convert string to hexadecimal on command line

Linux
I'm trying to convert "Hello" to 48 65 6c 6c 6f in hexadecimal as efficiently as possible using the command line. I've tried looking at printf and go...
1 year ago

Running command on bootup before rc.local

Linux
I'm running Debian on Beagle Bone computer. What I want is disabling dmesg output to console whenever USB drive is inserted. 'dmesg -D' does the tr...
1 year ago

Looking for files NOT owned by someone

Linux
I'm looking to recursively look through directories to find files NOT owned by a particular user and I am not sure how to write this.
1 year ago

Yesod init command not found

Linux
got installed haskell platform and then run cabal install yesod-bin but when I type yesod init i get "bash: yesod: command not found..." how do...
1 year ago

ubnormal behavior when parsing an array

Linux
Since yesterday I am facing with a strange behavior of shell code. This is the code: #!/bin/bash operatori="/*-+=" temp=$1 len_temp=${#temp} f...
1 year ago

Remove white spaces from a variable

Linux
I want to remove the white spaces from a variable in Linux Shell and echo it on the terminal. Following is my code: echo "Enter your full name" read ...
1 year ago

Php Function to send SMS via Kannel

Linux
I can now send an SMS via kannel. However this is done via headers eg: header("Location:http://localhost:13013/cgi-bin/sendsms?username=xxxx&amp;pass...
1 year ago

linux-python suddenly cannot find modules

Linux
I am in real panic now. I was running my code just fine. Then I tried to install webdriver and then bam! I cannot run my python code anymore, it said ...
1 year ago

How to make two processes signalling each others continuously?

Linux
I want to simulate a game server that should continuously send and receive signals with its parent. The scenario is as follows: Parent sends signal ...
1 year ago

Abnormal behavior when parsing an array

Linux
Since yesterday I am facing with a strange behavior of shell code. This is the code: #!/bin/bash operatori="/*-+=" temp=$1 len_temp=${#temp} for...
1 year ago

How to sleep a process for a vary interval of miliseconds

Linux
I'm reading about Sleep nanosleep usleep but I'm not sure which one to use nor how to use it exactly... I need to make a process sleep for a random...
1 year ago

Memcpy performance on /dev/mem outside kernel ram

Linux
I'm using a SoC with a custom linux on it. I have reserved the upper 512MB of 1GB total RAM by specifying kernel boot parameter mem=512M. I can acces...
1 year ago

How to copy via wild card in linux/bash?

Linux
Here is what I am trying to do - assume a source directory: /xyz/2/file.txt /xyz/2/crapfile.txt /xyz/3/file.txt /xyz/3/crapfile.txt and I want to c...
1 year ago

create password for user with only ssh key

Linux
I have user on my linux machine. The user logs in using an ssh key. User does not have a password. I want to create a password for this user, as passw...
1 year ago