Skip to content

core dumped message is not captured in STDERR

I used to call my program with this line in bash shell to capture all stdout and stderr messages in the log file The log file shows no error but by examining the log, it’s obvious that there’s a problem and program terminates abruptly in the middle of execution. I have also tried these but the res…

Usage of lstat / stat from the linux kernel?

I’m hoping someone can fact check my assumptions on the question “Can lstat and/or stat be called form the Linux kernel 3.10.0 in Centos 7. I’ve been searching and reading as much as I can find and have only been able to confuse myself. I can’t tell if the examples I am finding are ava…

issue on import psutil inside python script

i’m not able to import psutil inside my scripts. But the library is installed on my machine. my library is inside this directory, on which there is also simplejson library: But if i create a script for example this: i get this errors: UPDATE launching pip install psutil i got this: Any ideas on how to r…

Abuse cURL to communicate with Redis

I want to send a PING to Redis to check if the connection is working, now I could just install redis-cli, but I don’t want to and curl is already there. So how can I abuse curl to do that? Basically I need to turn off what’s send here: I was able to get rid of the User-Agent altogether by

C Just Delete Some Part Of File

I have two files. I want to copy source file to destionation file. If they are different, then I just want to copy different line not all file. In the below case, two line are same, but destination has extra line. How can I just delete last line of destination file? For example: Answer On POSIX systems, if yo…

Specify output names on multiple files with curl using ranges

I am trying to download a few hundred URL’s and specify the output name for each, the only difference is an ID in the URL, such as ..something/1/something.., ..something/3/something.., ..something/4/something.. etc. I can use -o filename.zip but it will overwrite for each of the range of files, I am cur…