Skip to content

Reuse char * pointer needs to free and malloc again?

I would like to implement a main function such as in order to execute system commands. The following code is currently used : Because I need to enter other commands, I am currently using the same cmd_buffer by using free() before reallocating memory. Is it the right way to do ? Some other commands might be re…

Unix cat command problems [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 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 …

cron-job linux apache ssl

I have a server installed with apache2 and drupal 6. In my server, I have installed a module which need to use cron. I have a SSL certificate installed too. In my crontab y have this configuration: My server work but if I write this configuration in my sites-enabled/000-default: my module with cron stops work…

How to go back several levels history directory in linux?

Assume now in /home/dir1/dir2/dir3/dir4/dir5 I use cd jump to /home then jump to /home/dir1/dir2 i know cd – just can go back previous history directory now i want to go back /home/dir1/dir2/dir3/dir4/dir5,how can i do? Answer Use pushd /home instead of first cd /home and popd having all that navigation…