Skip to content

Redirecting output of a program to a rotating file

I am trying to redirect the output of a continuously running program to a file say error_log. The command I am using looks like this, where myprogram.sh runs continuously generating data and writing to /var/log/httpd/error_log myprogram.sh >> /var/log/httpd/error_log Now I am using logrotate to rotate t…

How do I set up a embedded MySQL client in Qt

I’m trying to set up my embedded Linux machine as a MySQL client, in order to connect to a external MySQL server (running on a remote machine). sqlite is not an option. I understand, thanks to Basile Starynkevitch that I have to use libmysqlclient (because that is the only library to run such a connecti…

apt-get install failed and not working

i need to install some Prerequisites for my buildsystem but the apt-get install command fails: log apt-get install command My system params are (running as VM): uname -a && lsb_release -a some hints to solve this problem would be helpful. Best regards Lars Answer I don’t really speak German, but…

how to daemonize a script

I am trying to use daemon on Ubuntu, but I am not sure how to use it even after reading the man page. I have the following testing script foo.sh Then I tried this command but nothing happened: The file hihihi was not updated, and I found this in the errlog: How could I use the daemon command properly? Answer

How to make path location dynamic in xml

I have a logback.xml configured in a spring MVC + hibernate project, it is working fine on my local machine. the local machine has windows 10 OS installed. I wish to run the code of production machine which has Linux installed. What is want to know, is there a way to make LOG_PATH and LOG_ARCHIVE locations dy…