linux tee is not responding

From man python: -u Force stdin, stdout and stderr to be totally unbuffered. On systems where it matters, also put stdin, stdout and stderr in binary mode. Note that there is internal buffering in xreadlines(), readlines() and file- object iterators (“for line in sys.stdin”) which is not influenced by this option. To work around this, … Read more

“git submodule update” failed with ‘fatal: detected dubious ownership in repository at…’

Silence all safe.directory warnings tl;dr Silence all warnings related to Git’s safe.directory system. Be sure to understand what you’re doing. git config –global –add safe.directory ‘*’ Long version Adapted from this post on I cannot add the parent directory to safe.directory in Git. I had the same issue and resolved it by disabling safe directory … Read more

How to get current process name in linux?

If you’re on using a glibc, then: #define _GNU_SOURCE #include <errno.h> extern char *program_invocation_name; extern char *program_invocation_short_name; See program_invocation_name(3) Under most Unices, __progname is also defined by the libc. The sole portable way is to use argv[0]