linux

How does gcc recognize that -lfl corresponds to flex library?

when i compile lex.yy.c with lfl gcc recognizes that some .a file of the flex library might be needed to be linked with my code. similarly for yacc we specify the -ly compiler option. in other words if i create a library, abc.a i want gcc to recognize that whenever a program is compiled with -labc it should link with the library abc.a. ...

debian man pages for system calls

Hi I installed debian lenny, but I was quite surprise that I can't get man pages for system call. like man 2 read etc. How to install them? thanks ...

How to register FUSE filesystem type with mount(8) and fstab?

I've written a small FUSE-based filesystem and now the only part's missing is that I want to register it with fstab(5) to auto-mount it on system startup and/or manually mount it with just mount /srv/virtual-db. How can I achieve this? I know, I can just run /usr/bin/vdbfs.py /srv/virtual-db from some init script, but that's not exactly...

Best resource on learning Linux command line?

Someone asked me recently what is the best resource for learning the Linux shell (she uses Ubuntu) but I really couldn't pinpoint one since I picked it up by just doing over time. But I am sure there are some books or, better yet, internet resources where one can find instructive ways of learning Linux and spreading the good word of *Nix...

IMAP folders diff?

I'd like to "diff" two IMAP folders (on two different servers) to compare spam filters, I'd like to have a command line tool (linux) to get just the headers (not the whole dir, e.g. using 'isync' or similar), something like this: $ imapget --subjects -p=password user@server or this: $ imapget --format "$DATE - $FROM - $SUBJ" -p=passwo...

Linux Setup Creator

I'm looking for a tool that's able to create "setup" packages for Linux, just like the Windows install creators do (NSIS, InstallShield, etc.). I want it to be able to present a graphical interface to the user (or ncurses based), where he can select some options and install the package. Any ideas of such a tool? I'm aware of autopackage...

VFD starter kit for linux

I'm looking to purchase a Vacuum fluorescent display (VFD) for personal use and I'm looking for anyone who has had experiences with programming to a similar device in linux. My question is not specific to a VFD, it can include LCD or similar, but linux is my target platform. I have a good programming background in C and I'm looking to g...

Simulate lack of system resources on Linux machine

Can someone recommend a utility to simulate a resource constraint on a Linux system. I need to test performance of the system under stress - both memory and CPU. I would need something that would allocate an amount of memory, therefore leaving less for the program I am testing. And also would use up all available CPU. I am preferring...

how do I do redo (i.e. "undo undo") in vim

In vim, I did to much undo. How do I undo this (i.e. redo) ...

How to convince my co-worker the linux kernel code is re-entrant ?

Yeah I know ... Some people are sometimes hard to convince of what sounds natural to the rest of us, an I need your help right now SO community (or I'll go postal soon ..) One of my co-worker is convinced the linux kernel code is not re-entrant as he reads it somewhere last time he get insterested in it, likely 7 years ago. Probably its...

Keyboard remapping with more modifiers

I'm looking for a way to add one more "layout" to my keyboard. I'm already using a layout that uses altgr for local alphabet letters. What I'd like to add is a mirrored righthand-side keyboard that's activated with the caps-lock (one described in http://xkcd.com/mirrorboard.xkb) Unfortunately ISO_LEVEL3_SHIFT is already taken by local a...

setting envirnoment variable in linux

Hai Linux, I wrote a small c program using gcc compiler and i named the executable has hello i want this hello to be executed from any place . How to set the environment variable in bash shell?. while installing some software it has it's own envirnoment variable how to set that?. Thank you in advance. ...

How can I decompile Linux binaries from Windows?

How can I decompile Linux binaries (*.so) from Windows? Thanks. ...

Memory usage of current process in C

I need to get the memory usage of the current process in C. Can someone offer a code sample of how to do this on a Linux platform? I'm aware of the cat /proc/<your pid>/status method of getting memory usage, but I have no idea how to capture that in C. BTW, it's for a PHP extension I'm modifying (granted, I'm a C newbie). If there are ...

Appending Text To the Existing First Line with Sed

I have a data that looks like this (FASTA format). Note that in comes with block of 2 ">" header and the sequence. >SRR018006 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGN >SRR018006 ACCCGCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC What I want to do is to append a text (e.g. "foo" in the > header) yielding: >SRR018006-foo NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...

Compiling Objective-C project on Linux (Ubuntu)

How to make an Objective-C project work on Ubuntu? My files are: Fraction.h #import <Foundation/NSObject.h> @interface Fraction: NSObject { int numerator; int denominator; } -(void) print; -(void) setNumerator: (int) n; -(void) setDenominator: (int) d; -(int) numerator; -(int) denomina...

Serial Device: Reading 8N1 works, but writing a single byte fails

Hi, In my program I read from the serial device (Linux, 8N1) without any problem. But in the case I want to write a single bit, I get nothing out on the interface. I assume that my serial output settings are wrong. But there aren't that many ways how to set c_oflag... My code: #define TTYDEVICE "/dev/ttyS0" #define BAUDRATE B9600 in...

How to retrieve data from an i2c device over usb in linux

Hi All, I have a temperature sensor, which is connected using an USB-I2C adapter (http://www.robot-electronics.co.uk/htm/usb%5Fi2c%5Ftech.htm) I attached this device to my linux computer (suse10). I typed dmesg and saw usb 3-3: new full speed USB device using ohci_hcd and address 10 usb 3-3: new device found, idVendor=0403, idProduct...

Jaxb Support for Netbeans 6.5

I have not been working on java for a long time, and now I am back; so I am sort of noob, particularly with Netbeans. I am using Netbeans 6.5 on Ubuntu. I want to use the Jaxb support to generate Jaxb binding from an XML schema, as documented at http://wiki.netbeans.org/NB6JAXBSample1 . But the document asks to click on "On Project node,...

Kernel compilation error

Hi, I was trying to compile the Linux kernel. I am getting the following error:- "No rule to make target arch/x86/kernel/entry_32.o', needed by arch/x86/kernel/built-in.o'." Before this I configured the kernel(didn't do anything extra except the default options). configured the kernel using "make gconfig". The config was generated. I...