Skip to content

Get notified about process termination

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…

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 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…

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…