linux

Linux vi arrow keys broken in insert mode

My arrow keys don't work in vi in insert mode at home, they just each insert a newline and a capital letter, like 'A'. Is there a way to fix that? ...

Hardened BSD from Scratch

I am aware of the Hardened Linux from Scratch project which is a project that provides you with step-by-step instructions for building your own customized and hardened Linux system entirely from source. I would like to know what is the equivalent in BSD? ...

What are good ways to get something like D-Bus to work across multiple Linux machines, possibly through firewalls?

The D-Bus specification says that D-Bus is.. a simple way for applications to talk to one another... Currently the communicating applications are on one computer... I would like something like D-Bus but to work across multiple Linux machines, and there may be firewalls involved. For example, if my mail server decides it receives a...

Git pull from partial repository?

I am trying to merge different versions of the same file in git for one of my projects. The only way git will let me do this is by branching the repo, modifying the file, and then pulling the branch into my master. The only problem is, my project contains 100's of files and I only need this one. Is there any way to pull from a branch con...

Best tool/library to download HTML page + all components

I am looking for a command line tool, or a library (preferably in Perl) to download an HTML page and all its components: external CSS, external JavaScript, images, flash or other objects, etc. I have not found a tool to do that. I could download the HTML page, and parse the HTML to find all the external links. But I'd rather not re-inve...

How to use linux command line ftp with a @ sign in my username?

How can I run this on linux command line when my username has an @ sign in the middle? ftp -u user:password@host/destination_folder/ sourcefile.txt My username is "[email protected]" and it thinks my host is "domain.com". I am stuck and cannot google my way out. Any help greatly appreciated. NOTE: This is an unattended upload, so I c...

How to backup the data from Nokia E51 on Linux system?

Is there an easy way to do backup/restore phone data? ...

How do you force a makefile to rebuild a target

I have a makefile that builds and then calls another makefile. Since this makefile calls more makefiles that does the work it doesnt really change. Thus it keeps thinking the project is built and upto date. dnetdev11 ~ # make make: `release' is up to date. How do i force the makefile to rebuild the target? clean = $(MAKE) -f ~/xxx/x...

how can I get the saddress from the struct "skbuff"

Hi, I have a program that it need get the source address from the struct "skbuff", In the previous kernel version, I can get the "saddr" using the following line: static __u32 get_src_ip(const struct sk_buff *skb){ return ntohl(skb->nh.iph->saddr); } The following is error message: error: 'const struct sk_buff' has no member name...

Concurrently read from a single file

I have the following problem situation. A bunch of data is split across 10k small files (approx. 8-16 kib each). Depending on user input, I have to load these as fast as possible, and process them. More precisely, each data packet can be split into 100-100k files, and there are approximately 1k data packets. Most of them are the smaller ...

Run startupscript on Fedora 8 Core

Hello. I'm using Amazon EC2 with a Fedora 8 Core AMI. I have an EBS volume mounted at /ebsmnt, and a startupscript located at /ebsmnt/startupscript.sh . Currently I have to login to the server, cd to /ebsmnt/ and run the script manually. How can I make Fedora run this script automatically at startup, without any interaction from me? (by ...

What is preemption / What is a preemtible kernel? What is it good for?

Explained in your own words, what is preemption and what does it mean to a (linux) kernel? What are advantages and disadvantages in having a preemptible kernel? ...

Creating executable files in Linux

Hi, I'm trying to progress from merely dabbling with Linux to actual full-blown use, but am still very much a novice, so please excuse this extremely basic question. One thing I plan to be doing is writing (painfully simple) Perl scripts, and I'd like to be able to run them without explicitly calling Perl from the terminal. I appreciate ...

Compile linux kernel (2.6) module including non kernel headers

Is it possible to compile a linux kernel(2.6) module that includes functionality defined by non-kernel includes? For example: kernelmodule.h #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> // printk() // ... #include <openssl/sha.h> // ... Makefile obj-m := kernelmodule.o all: $(MAKE) -C /lib/mo...

Locked file or directory in C

Hi, I have a daemon that watches a certain file for changes then processes the changes made to the file. But now I've noticed that when I attempt to read the file (using fgets) I get no data. This only happens after a change has been made the file, yet if I attempt to read the file at any other time I can read it fine. I think another...

does mysql 5.4 has a linux 32 bit version?

Can MySQL 5.4 beta be compiled for 32-bit processors under Linux? ...

Creating a self-extracting zip archive on a linux box

Due to a number of constraints that I won't get into, I have to create a self-extracting ZIP archive on a linux box. The resulting archive should be executable on Windows only. Is this at all possible? If so, what tools would do the job? Background: when the user downloads a setup package from my linux box, I need that setup package to...

Operations from atomic.h seem to be non-atomic

The following code produces random values for both n and v. It's not surprising that n is random without being properly protected. But it is supposed that v should finally be 0. Is there anything wrong in my code? Or could anyone explain this for me? Thanks. I'm working on a 4-core server of x86 architecture. The uname is as follows. L...

C / JSON Library in popular Linux distros?

I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros. I'd also really ...

Mono System.IO.Ports SerialPort class error handling

I am debugging some mono code that is using the serial port. At some point the mono write a table with the following code : // Send the 1024 byte (256 word) CRC table progressBar = new ProgressBar(); progressBar.Update(0.0,"Sending CRC table..."); for (int i = 0; i < MyCRC.Length; i++) { MySP.Write(MyCRC[...