I’m trying to use NETLINK with CN_IDX_PROC to monitor my process. This works but requires the monitoring process to be launched with root privileges. I’ve tried to fix it by setting a capability in the filesystem on my monitoring executable (including CAP_AUDIT_READ, CAP_SYS_ADMIN,CAP_SYS_PTRACE and CAP_IPC_O…
c++ thread_local destructors with pthread destructors
I want to do some work after all C++ thread_local destructors called. This is platform specific – Android, so I have access to pthreads. The question is, when pthread_key_created destructors should be called, before or after C++ thread_local destructors? Or they can be interleaved? I tested On Linux Min…
running python3 app at start up of Linux
I have the following script But the output is : the app has no problem running when I manually run it by typing python3 Server.py UPDATE: Clarification to the post I need the app to start running after the user pi logged in because it will need to get access to chrome Answer So after the previous comment was …
Understanding Unix Owner and chmod 777
I understand, Unix has 3 levels of ownership: Owner, Group, and Others. The owner is the one who creates the file and later on this Ownership can be moved using ‘chown’. However, I am confused with chmod 777 to ‘others’ or ‘groups’. Executing the previous command on a file …
Extract a block from file between two lines
I have a file/output containing this : I would like to extract all public subnet id and print them without, and white space. I used this regex And the output is : But I would like to get this instead: In fact I told sed to replace spaces and newlines with nothing (s/[[:space:]]//g) and then it also replace th…
How to specify more inputs as a single input in Linux command-line?
I searched online but I didn’t find anything that could answer my question. I’m using a java tool in Ubuntu Linux, calling it with bash command; this tool has two paths for two different input files: What I’d like to do is for example, instead of specify the path of a single FASTQ, specify t…
How do you determine where segfault occured when ip (null)?
segfault at 0 ip (null) sp bf9ed55c error 4 in appname[8048000+252000] If I don’t have the IP address, how do I determine where the crash occurred? does it being (null) mean anything useful? in the appname[8048000+262000] = 0x82Aa000 is that supposed to give a clue? is it the 0x82AA000 the value I shoul…
Running compiled Linux executable on other Linux computers
I’ve been working on a custom program that allows me to control my other Linux-based computers on my network. I’ve been using Python and used PyInstaller to compile the code into a Linux executable. Running the executable on my own computer works just fine and does exactly what it’s supposed…
Non-dash related bad substitution error
I am trying to write a bash script performing to find and pull somewhere else a specific file type. So far, I came up with the following script: find ./to_compress -type f -iname “*.tar” -mindepth 1 -maxdepth 1 -exec mv {} ./compressed/${{}##*/} However the bash complains that ${{}##*/} is a bad s…
how to set path for crontab in ubuntu
When I am trying to execute python on crontab ,I jut run a dummy program and I found the following information I have given my crontab like this What will be the path for my corntab Answer Always use absolute paths when adding cronjobs: