I'm trying to call io_submit using python ctypes.
The code I'm writing is supposed to work on both 32 and 64-bit Intel/AMD architectures, but here I'll focus on 64 bits.
I have defined the following:
def PADDED64(type, name1, name2):
return [(name1, type), (name2, type)]
def PADDEDptr64(type, name1, name2):
return [(name1, ty...
Hi
I need to monitor folders on my linux machine periodically to check whether they are exceeding certain limits.
I have checked stat function call but running stat recursively on all sub folders and files is time consuming and I need to do this for all folders.
Does kernal maintain any datastructures which I can interpret in my progr...
I need a text editor for linux with the following features:
Syntax Highlighting for PHP, Javascript (most have these)
Autocompletion of braces, parenthesis, and
Most important of all, editing via FTP.
Even more important of all, have a 'keep alive' function when editing via ftp. I have a not so fast internet connection and many editor...
Hello I am trying to get the difference between to text files. There are a lot of differences and viewing them in terminal is making it volatile since I cannot save them. I want to view and save the diff. How would I catch the output and print it to a text file??
Code I am using for getting the diff is diff -i -w -B file1.txt file2.txt
...
I posted a previous question "Seg Fault when using std::string on an embedded Linux platform" where I got some very useful advise. I have been away on other projects since then and have recently returned to looking at this issue.
To reiterate, I am restricted to using the arm-linux cross compiler (version 2.95.2) as this is what is supp...
Just out of curiosity, what is the preferred way to achieve interprocess synchronization on Linux? The sem*(2) family of system calls seem to have a very clunky and dated interface, while there are three ways to lock files - fcntl(), flock() and lockf().
What are the internal differences (if any) and how would you justify the usage of e...
I'm trying to grovel through some other processes environment to get a specific env var.
So I've been trying a sed command like:
sed -n "s/\x00ENV_VAR_NAME=\([^\x00]*\)\x00/\1/p" /proc/pid/environ
But I'm getting as output the full environ file. If I replace the \1 with just a static string, I get that string plus the entire environ ...
I'm trying to use something in bash to show me the line endings in a file printed rather than interrupted. The file is a dump from SSIS/SQL Server being read in by a Linux machine for processing.
Is there any switches within vi, less, more, etc?
In addition to seeing the line-endings, I need to know what type of line end it is (CRLF or...
I cannot use alsa as a normal user (resulting in me not having sound in chromium).
I am guessing it has something to do with permissions. Adding myself to group audio didn't help.
[zarac@towelie ~]$ grep audio /etc/group
audio:x:92:mpd,zarac
Testing sound as normal user:
[zarac@towelie ~]$ aplay /usr/share/sounds/alsa/Noise.wav
ALSA...
I have a question about the C++ visibility attribute. I have read http://gcc.gnu.org/wiki/Visibility and yet I dont quite understand how it works.
I want use the visibility to be hidden on some of my shared libraries I have. I believe this means that the symbols are hidden ?
How are you meant to link the shared library then ? Is there ...
Hey, for quite a while now, I am looking for a pdf viewer for the command line.
As I like to work without X on Linux, and often work on a remote machine, I would like to have a tool to read pdfs. There are quite a lot of really good graphical programs (evince, okular, acroread, ...) to do the job, so I figured there should be at least o...
I want to configure Apache to send to the user a 500 response with a custom 500 page when a PHP script raises a fatal error.
What I have now is that it will print the error inline with the page content which is good for development but not for production.
Thanks in advance.
P.S.:any good tutorial on how to tune php/apache for productio...
Hi ,
I have been able to create an image of a disk that had a lot of bad sectors . After few days of dd_rescue i eventually get almost all my data back. My partition is a ntfs filesystem . I have been able to mount the partition under linux ( via mount or loopdev ) but still wondering how to copy the valid files to another disk ( so sk...
I really love programming. But the cumbersome part is to setup the unix development environment.
I use ruby on Ubuntu/Mac os x.
I'm aware there are tools like rvm and vagrant that can help you in the process, but even though I have to set up everything manually in the OS.
Are there tools for setting up a full development environment a...
I am building an application that will run on Linux under Wine, and I'd like to add a few files to the default windows image that is created in ~/.wine when a user starts wine for the first time - kind of like /etc/skel that's used to create new users.
Is there a way to do this? I can't seem to find how ~/.wine is created.
Also, is the...
Hi,
I'm trying to run mysql hot copy and I want to create a user account to run that process. However, whenever I create a user account (granting it specific priviledges) and run mysqlhotcopy there is always the error
Unable to retrieve list of tables in {dbname}: DBD::mysql::db selectall_arrayref failed: Can't read dir of './{dbname...
How do I diassemble a an object program made on C(linux)?
Can anyone please help me with the command line.
...
I am writing a console application which is using some library in which (DEBUG) prints are enabled. In my main() application I am taking inputs from user. I want this user input to be separate from my library prints. I cant disable library debug prints. (The problem is library has lots of continuous prints over which it is difficult to t...
Is it possible to name the full path to source directory in rsync command instead of the name of the module.
For example:
rsync -av rsync://10.171.73.23/home/user/work/tests .
instead of :
rsync -av rsync://10.171.73.23/ftp/work/tests .
(ftp is a module from /etc/rstncd.conf)
When trying the first version I get '@ERR...
I want to debug TCP/IP interactions for a program I'm enhancing. I don't have root access (so no tcpdump etc), but the app runs under my own id. I could use e.g. strace to intercept the system calls, but are there alternatives worth recommending over that? If so, why - what do they offer? Command line prefered (no X server installed ...