How to gracefully shutdown emacs daemon? [closed]


Question Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered. Closed 7 years ago.…
Read more ⟶

What is the difference between CLOCK_MONOTONIC & CLOCK_MONOTONIC_RAW?


Question According to the Linux man page under Ubuntu CLOCK_MONOTONIC Clock that cannot be set and represents monotonic time since some unspecified starting point. CLOCK_MONOTONIC_RAW (since Linux 2.6.28; Linux-specific) Similar to CLOCK_MONOTONIC, but provides access to a raw hard‐ ware-based time that is not subject to NTP adjustments. According to the webster online dictionary Monotonic means: 2: having the property either of never increasing or of never decreasing as the values of the independent variable or the subscripts of the terms increase.…
Read more ⟶

Why am I getting undefined reference to `dladdr' even with -ldl for this simple program?


Question I'm working through an LLVM Tutorial, but I'm having trouble compiling. I've written a minimal example that reproduces the issue: #include "llvm/Module.h" #include "llvm/LLVMContext.h" int main(int argc, char **argv) { llvm::Module *module = new llvm::Module(“test”, llvm::getGlobalContext()); return 0; } When I try to compile, I get a bunch of 'undefined reference' erros: clang++ `llvm-config --cxxflags` -c -o test.o test.cpp clang++ test.o `llvm-config --ldflags --libs core` -o test /usr/lib/llvm-2.9/lib/libLLVMSupport.a(Signals.o): In function `PrintStackTrace(void*)': (.…
Read more ⟶

How to check if a program is run in Bash on Ubuntu on Windows and not just plain Ubuntu?


Question Pretty straightforward, the usual places to figure out the OS you're on seem to be identical to plain Ubuntu on Ubuntu for Windows. For example uname -a is identical to a native GNU/Linux install and /etc/os-version is identical to a Ubuntu Trusty Tahr install. The only thing I can think of is to check if /mnt/c/Windows exists, but I'm not sure if that's a foolproof idea. Answer The following works in bash on Windows 10, macOS, and Linux:…
Read more ⟶

Docker: COPY failed: file not found in build context (Dockerfile)


Question I'd like to instruct Docker to COPY my certificates from the local /etc/ folder on my Ubuntu machine. I get the error: COPY failed: file not found in build context or excluded by .dockerignore: stat etc/.auth_keys/fullchain.pem: file does not exist I have not excluded in .dockerignore How can I do it? Dockerfile: FROM nginx:1.21.3-alpine RUN rm /etc/nginx/conf.d/default.conf RUN mkdir /etc/nginx/ssl COPY nginx.conf /etc/nginx/conf.d COPY ./etc/.auth_keys/fullchain.pem /etc/nginx/ssl/ COPY ./etc/.auth_keys/privkey.pem /etc/nginx/ssl/…
Read more ⟶

How to copy a file from remote server to local machine? [closed]


Question Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered. Closed 8 years ago.…
Read more ⟶

How to change all occurrences of a word in all files in a directory


Question I was in the process of creating a User class where one of the methods was get_privileges();. After hours of slamming my head into the keyboard, I finally discovered that the previous coder who I inherited this particular database spelled the word "privileges" as "privelages" in the MySQL database, and thus also everywhere in the hundreds of files that access these "privelages" it is spelled that way. Is there a way in Linux (Ubuntu Server) that I can go through every place in the /var/www folder and replace "…
Read more ⟶