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…
How do I restart wlan0 with the static ip instead of a dynamic ip? [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 …
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 …
Does the qstr struct in a kernel dentry hold the filename of a Linux file?
Below is a snippet of the Linux dentry struct from http://lxr.free-electrons.com/source/include/linux/dcache.h#L150. The struct contains a member struct qstr d_name – definition below. I would like to know if this is the name of the particular file that would correspond to this dentry at runtime. What c…
Installing setuptools from source “No module named numbers” error
This is based on Install Python Flask without using pip My environment has no rpms installed or enabled, nor do I have pip, easy_install, virtualenv, etc. Based on the answer in the linked question, I need to install setuptools in order to install Jinja. To do this, I downloaded and un-tared setuptools-19.1.1…
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 get a single output file with N lines from N multiline files?
I am looking for some effective way to concatenate multiple multiline files into one file – here is an example for three input files: 1.txt: 2.txt: 3.txt: output.txt: (Replacing each linebreak with single whitespace). Which way can you recommend? Answer Using BASH for loop: If you want to strip one endi…
What are these unfamiliar lines in the C preprocessed file?
This is an output of the GNU cpp on a Hello World program in C. I am wondering what do these lines mean? # Number Header_File_Location [Numbers] Are these some kind of dependencies? If yes, then on what? Line numbers? Answer Those are line number directives, and tells the compiler what line and file the next …
Find command with size and time and sorted by timestamp
I have the following folder setup for example I need to recursively list them with file size, modification time and sorted by modification time recent first. I have tried the below without size… Any pointers? Answer %T+ – modification time (and date) %s – size %p – path of file
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…