unix

uniprocessor or multiprocessor

On unix, how could we know whether the system is multiprocessor or uniprocessor? ...

Calling SQL Server database from Unix

With oracle currently there is a way to call a database through a command prompt using sqlplus. I'm wanting to know if there is a way to call a SQL Server server the same way so that I can have a shell script do it for me. Is there a way? ...

crontab report of what runs in a specified start and end datetime

Are there any tools or reports out there that given a crontab file can output which jobs run within a specified time-frame. Our crontab file has become very large and our system administrators struggle to find out which jobs need to be rerun when we have scheduled downtime on the server. We're trying to figure out which jobs we need to ...

core dump in a multithread program

Hi, i was trying to write a simple multithreaded program. It is dumping the core. I have my function that is called when a thread is created below: void *BusyWork(void *t) { int i; int *tid; int result=0; tid = t; printf("Thread %d starting...\n",*tid); for (i=0; i<10; i++) { result = result + (i* i); } ...

query about a multithreading program

this might a simple query. when we are creating a thread we are passing the (void *)t as an argument to a function PrintHello.we are copying the value in the pointer threadid(typacasting it to long) in tid which is a long variable again.i am confused with the parameter passing. is this a pass by reference or pass by value.over all is t...

Shared POSIX objects cleanup on process end / death.

Hi, Is there any way to perform POSIX shared synchronization objects cleanup especially on process crash? Locked POSIX semaphores unblock is most desired thing but automatically 'collected' queues / shared memory region would be nice too. Another thing to keep eye on is we can't in general use signal handlers because of SIGKILL which ca...

How do I start to use multithread programming?

I am a beginner on Stack Overflow. I am working on a Unix platform in C/C++. Knowing basic programming in these regards how could I start with multithreading? Multithreading seems to be very interesting and I want to grow my knowledge in this regard. How could I get started with multithreading and what are the best techniques/books/ebo...

Get the date (a day before current time) in Bash

How can I print the date which is a day before current time in Bash? ...

validation tool for shell scripting

Is there any validation tool for shell scripting on unix platform. like after the completion of the script the tool validates it and warns us of eroors? ...

Writing application for both Unix and Windows

I'll write a program for Interactive UNIX (http://en.wikipedia.org/wiki/INTERACTIVE%5FUNIX). But in a year it will be ported to Windows. I'll write it in ANSI C and/or SH-script. When it runs on Windows it will be run as a Windows service. How do I make it as easy as possible for me? I want to change as little as possible when I port it...

second previous command execution

hello in unix command line !! will execute th eprevious command on the command line like below indibm202 21: date Tue Nov 10 17:38:13 IST 2009 indibm202 22: !! date Tue Nov 10 17:38:16 IST 2009 indibm202 23: what is the command to execute the second previous command? ...

Batch Job Dependencies Using Open Source/Free Software

I run a large data warehouse plant where we have a lot of nightly jobs running concerruently however many have dependencies on a extract or data load process before they start. Currently we use an 'expensive scheduling system' to scehdule these at the moment. Is there any way you can setup job dependencies using an open source or free u...

Opening files in the same folder as the current file, in vim

In vim, when I have a buffer open, I often need to load another file in the same directory that file is in, but since I don't usually cd into it, the pwd is a parent folder, so I have to retype the path every time. Is there a shortcut for this? or a way to change the pwd to the directory the file is in? example: cd /src vi lib/foo/file...

List of commands of linux which can be helpful for php develpment

Hello. Every one. Actually I would like to know the list of commands & there use, which can be helpful for php development. Say for example, Crop Command => May be used to crop an image, Cut image I know very few commands of linux like "ls", "pwd" just the basic ones. I am not much interested to learn all linux programs. But The com...

A few /proc and /dev questions

(1) Is /proc always present on all linux systems or is it an option somewhere (e.g. kernel compile, boot, etc)? (2) What determines what sub-directories are present in /proc? Are these always the same or are they configurable and/or creatable by user-space programs (presumably run as root)? (3) I noticed that /dev/shm was present on m...

Book recommendation for Unix shell commands

Hi, I want to learn more about UNIX shell commands, so I am searching a good book, that explains the most needed shell commands and how to get better on the terminal in general. I am using Ubuntu(Debian). The book should not have more than ~250 pages. I am neither a noob nor a pro using the terminal. Best regards ...

copying a list of files via terminal

I have a list of filenames called list.txt. I would like to copy the files in this list to a new folder. How should I go about doing this? Thanks! ...

Can someone fix this python problem for me? (cannot find a module...)

I installed Yahoo BOSS (it's a python installation that allows you to use their search features). I followed everything perfectly. However, when I run the example, to confirm that it works, I got this: $python ex3.py Traceback (most recent call last): File "ex3.py", line 16, in ? from yos.yql import db File "/usr/lib/python2.4...

c library function to get number of active threads

Hi everybody, I'm developing a multi threaded Unix application in C. Is there a simple way to get the count of the number of simultaneously active threads? I don't want to have to write the code to keep track of the number of active thread if it already can be done for me by the library! :-) I'm using POSIX pthreads, and I'm trying to ...

What are some of the major pro/con of FreeBSD vs GNU Linux vs OpenSolaris?

What are some of the major pro/con of FreeBSD vs GNU Linux vs OpenSolaris? Which is the best operating system to program/develop against? ...