linux

how do you make an x86 assembly program in linux that converts files to uppercase?

I found a pdf file called: ProgrammingGroundUp-1-0-booksize.pdf, and one of the projects is to make an assembly program that takes in files and converts them to uppercase, ` .section .data #######CONSTANTS######## #system call numbers .equ SYS_OPEN, 5 .equ SYS_WRITE, 4 .equ SYS_READ, 3 .equ SYS_CLOSE, 6 .equ SYS_EXIT, 1 #options for ope...

Simplest way to show a clock in C++ and Linux.

I'm using C++ under Linux compiling with standard GCC. In my program I want to add a simple clock showing HH:MM:SS. What's the easiest way to do that? ...

How to rename a directory via its sysmlink ?

I have this : ubuntu:~/tmp$ ls -l total 4 drwxr-xr-x 2 abc abc 4096 2010-10-23 14:13 dir1 lrwxrwxrwx 1 abc abc 4 2010-10-23 14:13 dirln -> dir1 dir1 is empty I want to rename dir1 to dir2 via dirln, like this: ubuntu:~/tmp$ mv dirln/ dir2 mv: cannot move `dirln/' to `dir2': Not a directory This gives error. Can I rename a direc...

#include <CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h> doesn't include ogre headers correctly

Using Ubuntu 10.10 I have compiled and installed the latest Ogre and CEGUI libraries. I can #include for example but when I try to add the CEGUI headers I have issues. #include <CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h> This in turn includes OgreBlendMode.h and OgreTextureUnitState.h but doesn't have the OGRE/ in front of it. ...

Capture segmentation fault backtraces from Ruby and Resque on Linux

We're running Ruby workers across a large number of machines using Resque. Every once in a while, we see segmentation faults in our Resque worker processes. It's hard to debug these, because they're fairly rare, and we must run tens of thousands of distributed jobs to trigger a crash. Ideally, we'd like to capture backtraces and core fi...

how do i switch custom kernels?

hello guys, i have created and installed a new kernel in my ubuntu system, but now i have added a new system call and created a new kernel, how do i set this new kernel as the one the OS should boot from. dpkg -i kernel-image-2.6.deb i tried this on my first kernel and this set the kernel to this one then i added a new system call ...

does a runonce command exist to limit command execution

Does this command exist for Linux? runonce --dampen 300 echo "hello" The command would take a command to run and optional criteria to limit of frequently it is executed. The option dampen says wait 300 milliseconds and then run the command. Any other executions of this command get coalesced into a single run. This allows you to colla...

v4l2 very simple example

Hi, I'm looking for a simple example for camera access in Linux using V4L2. Where I can find it? As simple, as possible. Thanks, ...

How to map a custom file extension to mono?

I have mapped *.xyz extension to my own custom handler in asp.net and can run it on Windows asp.net. How can I do the same thing on mono (Linux/Apache - ubuntu)? I have this in my web.config: <httpHandlers><add path=".xyz" verb="" type="MyCustomHandler,..."/>... I also added similar things to mod_mono.conf and several other files but...

Checking if user has permissions for file in *nix

Out of curiosity. I've been thinking about the different access models often seen in *nix and the one seen in windows nt based systems. Is there any command or api to check if a file is readable, executable etc for a user different than the logged in user. For instance something like: http://www.php.net/manual/en/function.is-executable...

Python 2.7 cannot import PyQt4

I've upgraded to Python 2.7 from Python 2.6 on Ubuntu Maverick Meerkat (10.10) and I'm unable to import PyQt4. austin@gerald:~$ python2.7 Python 2.7.0+ (r27:82500, Sep 15 2010, 18:04:55) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt4 Traceback (most recent call last): Fil...

Debian,update-rc.d error,sos

/usr/sbin/update-rc.d -f nginx defaults update-rc.d: using dependency based boot sequencing How to fix it? ...

Has my linux server been attacked?

I feel as if my server (ubuntu 10.4) has been attacked. I'm a bit of a linux noob. I run a website and a few rows of mysql data have been deleted. This has happened three times now. The auth log is empty prior to 2:00pm ET today. All that shows prior to my logins were a few cronjobs running. The data disappeared between 7pm and 10p...

How to interleave the lines of two text files in Linux?

What's the easiest/quickest way to interleave the lines of two (or more) text files? Example: File 1: line1.1 line1.2 line1.3 File 2: line2.1 line2.2 line2.3 Interleaved: line1.1 line2.1 line1.2 line2.2 line1.3 line2.3 Sure it's easy to write a little Perl script that opens them both and does the task. But I was wondering if it...

On redirection does the redirected page gets processed?

I put redirection code on the top of a page which has bootstrapping code below. Does redirection spawn a different process making the redirecting page process as a background process or it kills the current process entirely? Im using header() for redirection but surprisingly the remaining code below header() which required database con...

linux: dual mice - multiple mice with multiple mouse pointers?

is it possible to use more then one mouse in Linux so that there's two pointers controlled by two mice? or can i get raw data like x,y from a second mouse even if there's no pointer? ...

Is it possible to allocate a certain sector of RAM under Linux?

I have recently gotten a faulty RAM and despite already finding out this I would like to try a much easier concept - write a program that would allocate faulty regions of RAM and never release them. It might not work well if they get allocated before the program runs, but it'd be much easier to reboot on failure than to build a kernel wi...

secure Linux distribution

hi, What do we mean by secure Linux distribution and securing Linux kernel? Abdul Khaliq ...

ubuntu linux -- mouse scroll wheel up or down to type letters?

Is it possible to have the scroll wheel on my mouse send a keystroke instead? so when i scroll upward it sends the letter "a" and downward it sends the letter "b"? ...

how to determinate destination MAC address

My application is running on CentOS 5.5 I need to send raw packets using libpcap API: pcap_inject() or pcap_sendpacket() To the specific IP address How can I determinate MAC address belongs to a specific target? ...