Why always ./configure; make; make install; as 3 separate steps?

Because each step does different things Prepare(setup) environment for building ./configure This script has lots of options that you should change. Like –prefix or –with-dir=/foo. That means every system has a different configuration. Also ./configure checks for missing libraries that should be installed. Anything wrong here causes not to build your application. That’s why distros … Read more

How do I list all cron jobs for all users?

You would have to run this as root, but: for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done will loop over each user name listing out their crontab. The crontabs are owned by the respective users so you won’t be able to see another user’s crontab w/o being them or root. … Read more

Get last field using awk substr

Use the fact that awk splits the lines in fields based on a field separator, that you can define. Hence, defining the field separator to / you can say: awk -F “https://stackoverflow.com/” ‘{print $NF}’ input as NF refers to the number of fields of the current record, printing $NF means printing the last one. So … Read more

Need to link cmake project to dl library

The answer turns out to be quite simple: cmake needs to be told to link with the DL libs, using ${CMAKE_DL_LIBS} . So, for any target that links with a library that uses dlopen, etc, invoke: target_link_libraries(MY_TARGET LIB1 LIB2 … LIBN ${CMAKE_DL_LIBS})