Currently I am developing GPIO kernel module for friendlyarm Linux 2.6.32.2 (mini2440). I am from electronics background and new to Linux. The kernel module loaded at start-up and the related device file is located in /dev as gpiofreq. At first time writing to device file, GPIO pin toggles continuously at 50kHz. At second time writing it stop toggling. At third
capture network traffic on two different ports simultaneously
I wish to capture tcpdump traffic on two different ports simultaneouly . I tried this .. Althoug it worked but problem is first it will wait for traffic on port 21 and when interrupted then it will wait for port 22. Also another problem is it will not capture the traffic on port 22 untill traffic on port 21 will
What is vulnerable about this C code?
The way I understand it, the code above allows arbitrary code (or program) execution — what makes this vulnerable, and how does one take advantage of this? Answer You can override the PATH variable to point to a directory with your custom version of echo and since echo is executed using env, it isn’t treated as a built-in. This constitues
What is a .pid file and what does it contain?
I recently come across a file with the extension .pid and explored inside it but didn’t find much. The documentation says: A Pid-File is a file containing the process identification number (pid) that is stored in a well-defined location of the filesystem thus allowing other programs to find out the pid of a running script. Can anyone shed more light
Undefined references in makefile
Ok, ive read about 10 tutorials, but i keep getting errors all the time, i have 5 files, main.cpp class.cpp, class.h and functions.cpp and functions.h. All of those use functions from different objects meaning that functions in functions.cpp uses objects from classes.cpp. My makefile looks as follows I keeps telling me that it has undefined references. What am i missing?
Using elisp, how to start, send-keys-to, and stop a command in emacs terminal emulator?
Using elisp (not interactive key-chords), how can I run a command in emacs terminal emulator; and how can I send key-presses to that buffer? Starting term seems to require (term “/bin/bash”), which has no scope for running a command. I assume that might be because term is intended as an interactive tool… Also I want to send specific keys to
Copy n bytes of data x to file
How we can copy for example 10 bytes of ‘7’ to a file? How can I generate those 10 bytes of 7? For example for n bytes of zero I’m doing dd if=/dev/zero of=myFile bs=1 count=10. Answer You can send the zeros to stdout and translate them to 7, or what ever you like.
Git man page seems incorrect
I’m new to git, so please excuse me if this is a dumb question. I have installed git 1.7.7.4 from source on SLES Linux, and all looks good. I have added the following to $MANPATH: When I do man git, I’m presented with This doesn’t look like a man page for the git command I use from the command line.
taking a screen shot of a specific area on the screen once every second
I would like to be able to take screen shots of a specific area on the screen once every second and have the file named MMDDYYYYHH:MM:ss is this possible using the command line and a program. I was thinking of using a script like this But I don’t know the commands to access the program to change the area on
Adding a status bar to c++ console applications
I am making a linux application using C++ and it will print info out to the console. Parts of the program will take a while to compute and I would like to add a status bar in the console similar to the one used in wget (I put my own depiction below). What would be the best way to accomplish