Sunday, August 2, 2009

Inter process communication using named pipes in unix .....?

how do we use named pipes for communicating between processes in unix system?? it will be helpful if u could give any simple example program .....i m trying to write it using a c program ...

Inter process communication using named pipes in unix .....?
I have experience with such stuff (such as writing my own basic shell with I/O redirection and backgrounding). But, I found this which saves me the time of typing a lot:





http://developers.sun.com/solaris/articl...





It has great explanations AND examples. If you have questions after that, we're here. :-)





############


Update:





Three things:





[[ 1 ]]


I included %26lt;stdlib.h%26gt;. This is because my system didn't recognize exit() without it.





[[ 2 ]]


You need to open the named pipe with proper permissions. (*Note 1) If you look at the permissions of 'mypipe' how you had it, it has p---------, or chmod 000. That's no good if you can't read or write. :-p Thus, when you open it, OR 0644 in the mode:





mkfifo("mypipe",S_IFIFO|0644), instead of


mkfifo("mypipe",S_IFIFO)





[[ 3 ]]


You need to open both ends of the pipe first. open() is blocking, meaning it waits for the other end of the pipe to be open. (*Note 2) To solve this, you can open one as non-blocking by ORing O_NDELAY. However, if you open, write, and close one end before the other end is opened, it will have sent everything before the other end was ready to look for it. The reading end needs to be open to receive what's written.





Thus, you need to open the reading end (non-blockingly, if that's a word) before you write on the other end. Below is your code with these aforementioned slight modifications, now working:





{{{{{{ BEGIN CODE }}}}}}}}





#include %26lt;fcntl.h%26gt;


#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;


#include %26lt;string.h%26gt;


#include %26lt;sys/stat.h%26gt;


#include %26lt;sys/types.h%26gt;





int main ()


{


int fd1,fd2;


char buf[100];


char *phrase = "Stuff this in your pipe and smoke it";





if (mkfifo("mypipe",S_IFIFO|0644))


{


perror("mknod66");


exit(1);


}


fd2 = open ( "mypipe", O_RDONLY|O_NDELAY);


fd1 = open ( "mypipe", O_WRONLY);


write (fd1, phrase, strlen (phrase)+1 );


close (fd1);





read ( fd2, buf, 100 );


printf ( "%s \n", buf );


close (fd2);


}





{{{{{{{ END CODE }}}}}}}}





*Note 1:


If you do some error checking on open(), you'll see that without proper permissions, open() returns -1 with an error: "Permission denied."





*Note 2:


You can witness the blocking in action. From my code above, remove the "|O_NDELAY" and your program will just wait... and wait.... and wait... (until you kill it or you open up the other end of the pipe somewhere else). In your code, you opened both ends of the pipe with O_RDWR, both reading and writing. The blocking is not an issue if you open it like that, because both a reader and a writer exist on the pipe, so it's happy and doesn't block.


Where can i purchase windows linux or unix online ?

Hi,


indeed, i need to purchase windows linux and unix (original copy ofcourse)


so, where can i purchasem them online and ship or download them ?

Where can i purchase windows linux or unix online ?
http://fedoraproject.org/


http://www.ubuntu.com/getubuntu/download
Reply:Windows can be purchased at most online retailers. Most Linux distributions can be download for free. Do a search with your favorite search engine.
Reply:www.distrowatch.org will give you access to 100 different linux distributions. I think the homepage also lists places to order install CDs as well, but as another poster says, you can download most of them for free, if you have the connection and the time. Ubuntu will send you a free CD, but it takes about 2 months to arrive.





Check the major bookstores in the magazine sections. There are at least 3 different magazines that have Linux installation DVDs in each monthly magazine - different, current distros each month.

online flower

Can anyone help me in making a unix program...?

my instructor ask me to make a ascript that will print all the possible command in unix and one the user selects the command the program will execute it

Can anyone help me in making a unix program...?
Almost all unix commands work with parameters - are you looking for a program which would interactively let you specify the parameters for all commands? That's actually an interesting idea, but I think you would need to just take one of the unix shells (bash, sh, ksh), go through all of the commands manually and write an interactive version for each one. You would in effect be creating a new type of shell...
Reply:Sounds bogus.





You click on the snoop command and you'll get errors since nothings sepcified.





You click on the find command and the same thing.





Your not looking for a unix script, you need tcl/tk or some perl to make an interface to click on.


What is the best way to learn UNIX?

I want to learn Unix on my own Can anyone tell me where I can find free materials, softwares and any useful link

What is the best way to learn UNIX?
Install FreeBSD and use it. Along with that buy a book or two, but use it and get rid of Windows.





http://www.freebsd.org/





Also you can get Solaris for X86 with a free license from Sun





http://www.sun.com/software/solaris/bina...
Reply:learn unix command using mind map.


http://mind-map-you.blogspot.c... Report It

Reply:buy the magazine every weekday it comes out there is a new one, my dad reads them all the time, they are expensive though, but they really do help.
Reply:One of the best places to learn UNIX is their own website. Instructions, tips, courses, news, projects, groups, etc It's all here for current up-to-date knowledge.





http://www.linux.org/
Reply:"UNIX for Dummies" for a book I was typing commands the very next hour after reading the first few chapters. Very user friendly and in most public libraries which is where I first borrowed it.





I just Installed Red Hat Linux 7 and hit the ground running - both I got via my local community www.Freecycle.org .


How to run the businessobjects reports in unix,i need commonds plz?

i have to run the reports in unix environiment business objects 6.5 version .ineed commands plz

How to run the businessobjects reports in unix,i need commonds plz?
This may help this is just a quick search on google got about 750,000 + hits!!!
Reply:Check out www.forumtopics.com. You can get all the naswers to your questions.





Hope this helps.


Need code for converting normal time to unix time?

i need the C code for converting the normal representation of time to unix representation, can any one help.

Need code for converting normal time to unix time?
If you mean converting from stuctured time (year/month/day/hour/minute) to Unix time (number of seconds since 1/1/1970), you do it using mktime() function:





http://www.cplusplus.com/reference/clibr...





The function returns Unix time.

hawaiian flowers

Can Vista be installed over Linux (or Unix)?

if i was to install a Linux (or Unix) operating system onto a completely blank hard drive, would i then be able use it to install vista over it, completely removing the Linux OS. and if so, what is the smallest Linux distro that would allow this.


Also assuming that i would use Vista Ultimate and that installing Vista directly from the disc is out of the question but booting from a UBS flash stick is (a 1Gig flash drive that is, which is too small for Vista to fit on).


thankyou

Can Vista be installed over Linux (or Unix)?
run live cd and make the hd partition to ntfs then u can do vista.


From one unix flavor to a specific url, describe ping in detail.?

This is a question that I used to use in interviews. The idea was to see just how deep a candidate could get. I would use this:


"given: a unix flavor of your choice, network connectivity using DNS for resolution, describe what would happen if you typed ping www.netscape.com" Given, all ports are open and network connectivity is fine. Difficulty: I'm looking for detail from what happens when you type to the kernel, to the process to the network, etc until you get the reply and how/why that reply hits your screen. If you can't get that deep on somethings, no problem - go as deep as you can on what you have knowledge in.

From one unix flavor to a specific url, describe ping in detail.?
Im not real interested in answering it but...





Here is one of my favorite questions to use in interviews.


"Go to the commands directory, list the commands, and tell me what they do". Being able to do that for over 20% of the commands is doing pretty good (dont respond until you have tried it since you wold probably be surprised at all the commands there that you have never used)





The funniest story is that we required people applying for Unix SysAdmin to provide resumes in ascii attached to an email. It was freaking amazing how many really impressive resumes failed that first test. We had people call us and beg us to let them fax their resume because it was "specially formated" but when we got it there was nothing there that needed it. They just didnt know how.


Help with Unix code?

Hi everybody,


I downloaded a program to run a forum for my own web page.


But, for me to installed, I have to:





1. Set the permissions for simpleforum.cgi to 755. This means read/write/execute for the owner, and read/execute for group %26amp; everyone. (chmod 755 simpleforum.cgi)





2. Set the permissions for simpleforum_files to 777. This means read/write/execute for owner, group and everyone. This directory should be located in the same directory as simpleforum.cgi.





Would you guys give me a hint about the code? I am willing to learn. Or is there any Unix expert who is willing to help me please.





Thank you

Help with Unix code?
This is nothing to do with code. Do you have a unix machine? If so use man chmod and man chown to see how these work. They are not to be played with lightly as you can stop the machine easily working as root with these.
Reply:Also, for the directory, make sure you use chmod 777 -R directoryname, so they can use the files.


(It might be -R 777, I'm not on my Linux box and can't check it)
Reply:you have the code "chmod 755 filename"





these codes are required for LINUX based servers. if you are on windows then just change the permissions so everyone can read and edit. the files.


Recursive scp from NT to unix stalls.?

I run a scp -r command from hp unix box to a NT box (which I don't hav access to) to pull pdf files down to unix. there are bout 300 file in the dir where i pull them from. scp pulls about 20-30 of them and then says "stalled 0%". it does not stop on the same file. I also tried tar'ing all the files, gzipa nd then scp'ing the one file down but still the stall occurs. any help is appritiated.

Recursive scp from NT to unix stalls.?
Try adding the "-C" to the command, to compress on the fly.


This was found to work by the reference below.


HTH

garden furniture

What are the references with Unix and Apple OS X Tiger?

as apple x tiger is the new flavour of unix could you tell me what are references of unix and x tiger?

What are the references with Unix and Apple OS X Tiger?
Apple Computer's operating system, OS X, is built on a Unix system (the Mach kernel and BSD libraries and programs).





Apple has some info here:





http://www.apple.com/macosx/overview/adv...





This book has more info than you'll ever need about the technical details:





http://www.osxbook.com/





The author has some articles about OS X and Unix also:





http://kernelthread.com/


Can you get a free unix shell to work on with all features which can be connected over telnet through Putty ?

Hi.. looking to get some practice on unix. downloaded putty client. is there some site that offers a free unix box?

Can you get a free unix shell to work on with all features which can be connected over telnet through Putty ?
try some free utility like cygwin.. it gives you a unix like feel...


Graphics in UNIX with C++?

I'm trying to make a game in C++, but it's going to have to be in UNIX, rather than windows.





Are there any libraries I can use for graphics? (Unfortunately, I can't download any SDKs or anything)

Graphics in UNIX with C++?
X Windows





http://en.wikipedia.org/wiki/X_Window_Sy...





http://pangea.stanford.edu/computerinfo/...





http://www.x.org/wiki/
Reply:libsdl.org for sound, input, graphics etc.


opengl for 3d graphics


openal for 3d sound
Reply:http://trolltech.com/


Try using the Qt lib set


Why will Unix time reset to zero in they year 17,014,118,346,046,923,173,168...

I read that Unix time will reset to zero in the year 17,014,118,346,046,923,173,168,730,371,5...


Why is that?

Why will Unix time reset to zero in they year 17,014,118,346,046,923,173,168...
The counter which counts time will overflow. It is only defined to be a certain number of bits long -- probably 64.
Reply:Is that for real???? No kidding??????????? Now I'm worried.





plrr
Reply:That is a very big number, 1.7 x 10^22. By that time, dark energy will have blown all away to awful empty flatness! The stars long gone, no matter, no energy, nothing remains.





But the real case is:


"At seven seconds past 03:14 AM on January 19, 2038 the counters on every Unix computer in the world will be full and will roll over to "0." Many computers assume the time as January 1, 1970. Because many computers store the number of seconds as a 32-bit signed integer, the Unix epoch is often said to last 231 seconds, thus ending at 03:14:07 AM January 19, 2038."
Reply:If that is true, it is probably due to the number of bits assigned to the year field of the system time.

flowers delivery

Can dynamic ip can be assign on UNIX environment?

for example, the server is any unix (solaris/linux/aix)OS and the clients are windows (xp)based machine if its possible

Can dynamic ip can be assign on UNIX environment?
Yes its possible..and been done that way for years.
Reply:Sure, as long as the server is running a DHCP server.
Reply:Never eat soggy waffles.


Is 46 too old to become a Unix Solaris Administrator?

I was thinking specializing in Solaris. I know nothing about Unix or Linux. How hard is to learn the material? How long will it take me to get an entry position? Also I am 46 so is it too late to switch career? Now , do employers hiring Solaris Administrator expect a degree with high profile tech? Or they are willing to give chances. Thank you.

Is 46 too old to become a Unix Solaris Administrator?
It can be hard or easy depending on how deep they go into it and what computer stuff you have done in the past. A company with custom hardware/software like Sun would have tech support for the administrators so once you get out there in the workplace you can call em up for help if there was something you missed in the course and there's always google too.





Some bigger companies/recruiters who may get lots of applicants may throw away resumes if they don't have certain qualifications. But I've met some people with degrees who tell me they don't know anything cause they only teach them theory there.





If you have a steady career history at 46 they may consider you more than a younger guy, from my experience a lot younger people last 2 yrs max in the same job.
Reply:solaris is super niche and like any other OS it will take time to master. The problem you will have is finding a job not many companies use solaris, but on the other hand there aren't that many solaris sysops so there is less competition. Its never to late to learn a new OS but me personally would go with linux server admin
Reply:You can't teach and old dog new tricks.





Not that I'm calling you and old dog, you understand.





I think you will find it hard, though, if you have no UNIX experience.
Reply:I don't know much about Solaris. The best thing I could tell you is to go to careerbuilder.com or monster.com and search solaris jobs to see what the standard qualifications are.

mothers day cards

Information about UNIX ?

i need website about UNIX?

Information about UNIX ?
website? Trust me on this, if you haven't done your homework properly by reading the basics from your prescribed books, you'll be overwhelmed by the wealth of information available on the web about UNIX or any other thing for that reason.





If you insist on UNIX, the only known UNIX to run on desktops is OpenSolaris. Goto www.opensolaris.org for anything related to that. Be warned, however, that books should be your starting point and they should give you a solid foundation.





If you are looking at GNU/Linux, goto www.google.com/linux and search to your taste and your heart's content.





There is FreeBSD, NetBSD, OpenBSD and a few more variants as well which qualify to be called UNIX.





Besides these, look at comp.unix.* and comp.os.linux.* hieratchy of newsgroups on Google groups.





There are many channels for live assistance from volunteers on freenode as well. Learn to use IRC and you will be ready to go.
Reply:http://en.wikipedia.org/wiki/Unix





Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT%26amp;T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT%26amp;T as well as various commercial vendors and non-profit organizations.


Is 46 too old to become a Unix Solaris Administrator?

I was thinking specializing in Solaris. I know nothing about Unix or Linux. How hard is to learn the material? How long will it take me to get an entry position? Also I am 46 so is it too late to switch career? Now , do employers hiring Solaris Administrator expect a degree with high profile tech? Or they are willing to give chances. Thank you.

Is 46 too old to become a Unix Solaris Administrator?
It can be hard or easy depending on how deep they go into it and what computer stuff you have done in the past. A company with custom hardware/software like Sun would have tech support for the administrators so once you get out there in the workplace you can call em up for help if there was something you missed in the course and there's always google too.





Some bigger companies/recruiters who may get lots of applicants may throw away resumes if they don't have certain qualifications. But I've met some people with degrees who tell me they don't know anything cause they only teach them theory there.





If you have a steady career history at 46 they may consider you more than a younger guy, from my experience a lot younger people last 2 yrs max in the same job.
Reply:solaris is super niche and like any other OS it will take time to master. The problem you will have is finding a job not many companies use solaris, but on the other hand there aren't that many solaris sysops so there is less competition. Its never to late to learn a new OS but me personally would go with linux server admin
Reply:You can't teach and old dog new tricks.





Not that I'm calling you and old dog, you understand.





I think you will find it hard, though, if you have no UNIX experience.
Reply:I don't know much about Solaris. The best thing I could tell you is to go to careerbuilder.com or monster.com and search solaris jobs to see what the standard qualifications are.


Information about UNIX ?

i need website about UNIX?

Information about UNIX ?
website? Trust me on this, if you haven't done your homework properly by reading the basics from your prescribed books, you'll be overwhelmed by the wealth of information available on the web about UNIX or any other thing for that reason.





If you insist on UNIX, the only known UNIX to run on desktops is OpenSolaris. Goto www.opensolaris.org for anything related to that. Be warned, however, that books should be your starting point and they should give you a solid foundation.





If you are looking at GNU/Linux, goto www.google.com/linux and search to your taste and your heart's content.





There is FreeBSD, NetBSD, OpenBSD and a few more variants as well which qualify to be called UNIX.





Besides these, look at comp.unix.* and comp.os.linux.* hieratchy of newsgroups on Google groups.





There are many channels for live assistance from volunteers on freenode as well. Learn to use IRC and you will be ready to go.
Reply:http://en.wikipedia.org/wiki/Unix





Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT%26amp;T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT%26amp;T as well as various commercial vendors and non-profit organizations.


Clarification in Unix shell script error message?

Hi


I have Unix shell script that invokes PL/SQL procedure.


THe batch job when executed terminated with the error message 'unlimited: The specified number is not valid for this command.'


Please let me know what is the root cause of the issue and how to fix the issue.


Thanks

Clarification in Unix shell script error message?
The root cause is an error in the shell script or in the data it retrieves meaning you are not matching what a command expects to get as input.





You need to identify which line is failing and what its input is. I suggest you do the following:





Put a line that says 'set -x' near the top of the script. This will tell you wherethe failure happened... then use 'echo' to see what the command input is.
Reply:I think you have to give more information. From where you got the message(Like code line) or can you post your shell script.

hide song

What's the best Linux / Unix emulator for Windows XP?

Im looking for a Linux / Unix emulator for my Windows XP OS which will not only allow me to use Windows XP but will allow me to switch to Linux / Unix aswell.

What's the best Linux / Unix emulator for Windows XP?
try to reload your boot loader from Linux cd .





for this reboot pc then boot pc using Linux cd install Linux and when it ask u to bootloader save it MBR (master boot record).








In mepis it gives option when u r running from live cd ...
Reply:cygwin





RJ
Reply:If you just want to try Linux out, either download a LiveCD distro, or get a virtual machine. I recommend InnoTek VirtualBox, becuase, unlike VMWare Workstation, it is free, and unlike VirtualPC from Microsoft, it has no restrictions about running on a "Home" version of Windows.
Reply:VMWare is probably the best. I've successfully installed and run Ubuntu in a virtual machine using MS Virtual PC, but it was very slow.
Reply:There is a Unix OS made especially for windows - it's sold under the name "Linspire" but is made from the same company that produces the RedHat Fedora core type of product.





If you need help in partitioning, there is a program you can download called partition magic - way less confussing than XP standard.


What's UNIX? isn't MAC OS X from the macintosh company?

what's UNIX? isn't MAC OS X from the macintosh company?

What's UNIX? isn't MAC OS X from the macintosh company?
Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT%26amp;T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT%26amp;T as well as various commercial vendors and non-profit organizations.





As of 2007, the owner of the trademark UNIX® is The Open Group, an industry standards consortium. Only systems fully compliant with and certified to the Single UNIX Specification qualify as "UNIX®" (others are called "Unix system-like" or "Unix-like").





During the late 1970s and early 1980s, Unix's influence in academic circles led to large-scale adoption of Unix (particularly of the BSD variant, originating from the University of California, Berkeley) by commercial startups, the most notable of which is Sun Microsystems. Today, in addition to certified Unix systems, Unix-like operating systems such as Linux and BSD derivatives are commonly encountered.





Sometimes, "traditional Unix" may be used to describe a Unix or an operating system that has the characteristics of either Version 7 Unix or UNIX System V.


http://en.wikipedia.org/wiki/Unix





What is UNIX ®?


http://www.unix.org/what_is_unix.html





Welcome to UNIX.COM


http://www.unix.com/


-----------------------------


Mac OS X v10.5 "Leopard", is an Open Brand UNIX 03 registered product. Mac OS X v10.5 "Leopard" is also the first BSD-based OS to receive the UNIX 03 certification.





Mac OS X (IPA: /mæk.oʊ.ɛs.tɛn/) is a line of graphical operating systems developed, marketed, and sold by Apple Inc., the latest of which is pre-loaded on all currently shipping Macintosh computers. Mac OS X is the successor to the original Mac OS, which had been Apple's primary operating system (OS) since 1984. Unlike its predecessors, Mac OS X is a Unix OS[1] built on technology that had been developed at NeXT through the second half of the 1980s until Apple purchased the company in early 1997.





The first version released was Mac OS X Server 1.0 in 1999, and a desktop-oriented version, Mac OS X v10.0 followed in March 2001. Since then, four more distinct "end-user" and "server" versions have been released, most recently Mac OS X v10.4 in April 2005. The next version of Mac OS X, v10.5 "Leopard", is expected to be released in October 2007. Releases of Mac OS X are named after big cats, for example Mac OS X v10.4 is usually referred to by Apple and users as "Tiger".





The server edition, Mac OS X Server, is architecturally very similar to its desktop counterpart but usually runs on Apple's line of Macintosh server hardware. It includes workgroup management and administration software tools that provide simplified access to key network services, including a mail transfer agent, a Samba server, an LDAP server, a domain name server, and others.





Apple also produces customized versions of OS X for use on three of its consumer devices, the Apple TV[2],the iPhone and the iPod touch. The modified OS only contains what is needed for that particular device (un-needed drivers and components are removed).[3]


http://en.wikipedia.org/wiki/Mac_OS_X
Reply:first things first,





UNIX is an operating system with a lot of features that other os lacks.





it also acted as a base for a lot of other O.S., which together are called NIX family.





MacOS is from macintosh, and is a os for their mac systems.





i would like to differ from david, mac and unix are two seprate things mac can never be unix and unix can never be mac.
Reply:UNIX is a family of operating systems.





The current version of Mac OS X is a UNIX-like operating system (as is Linux).





The next version of Mac OS X (Leopard) will be a UNIX (certified by the owners of the trademark and conforming to the specifications that UNIX operating systems must conform to).


Image hosting unix or windows?

we are running websites around 10 - 11 and all these website pull the image image from one image hosting server which is our own.


but now it is creating problem in pulling images the images are not pulled at once they have to refreshed many times.





we host around 20000 images and they all are pulled from different websites.





or if any one could tell what image hosting should we use........


windows or unix or any thing else.


with benefit tooo

Image hosting unix or windows?
UNIX systems are the defacto standard when hosting websites. Windows systems simply aren't reliable or secure enough. They also have problems with restricive licenses and massive costs.





Use the UNIX system as an image cache. Load balance accross multiple systems, if required.
Reply:Why dont you upload your photos on Visual JPG ( The best Free Image Hosting :


http://www.Vjpg.com/


While doing UNIX or LINUX, do we have mouse? or its a complte keyboard based systemR?

is unix same as windows or not? Do we have something liek mouse - and use double click when we want to open a file or directory?

While doing UNIX or LINUX, do we have mouse? or its a complte keyboard based systemR?
Most Unix/Linux OS's have some form of desktop (gnome is my personal fav). However, many Unix/Linux servers that I have setup are headless (without graphical interfaces) and can only be accessed via command line.





On my system I spend about 80% of the time on a command line.
Reply:yes you can use a mouse in linux, plus you can use the keyboard as well, you can also use in what they call a command window, its all totally customisible to.
Reply:Almost all UNIX-based operating systems (such as Linux, Mac OS X etc.) do use the mouse, just like in Windows. Some distributions of Linux are pared down to just a text-based interface for those who are more comfortable with that, but it's relatively uncommon. For an example of one of the more popular Linux distros that uses the mouse (of course), you can check out Ubuntu Linux at http://www.ubuntu.com . You can even burn a CD of Ubuntu that you can run on your computer without installing anything, to see how you like it without any pressure.

fresh flower

Windows or UNIX. Which is the better OS ?

There are folks who like Windows and equivalent for UNIX. But what I don' t understand is do they not perform the same things on a computer.

Windows or UNIX. Which is the better OS ?
Unix and variants (Linux, BSD, etc.) are more stable and more secure in general. Unix was designed as a secure multi-user, multi-processing OS from the start so it would naturally be better in these respects than Windows which evolved from a single-user, mostly single-processing OS with little concern for security.





True, they do the same basic thing - provide a user interface to the hardware. The real differences are in how it's done.





I've used Linux exclusively for several years and see no compelling reason to use Windows. IMHO, Windows is playing catch-up and Ubuntu with Beryl still beats Vista. Desktop applications is where Unix/Linux has been lacking, although this is not much of an issue now. There are still many games that are only provided for Windows, and even then a lot of them can run on Linux by using WINE, Cedega, etc.
Reply:There's no all-around "better" OS. People have different needs and expectations and the value of an OS is going to depend upon that. A software engineer trying to put together a LAMP system on a Web server might prefer Unix, whereas a hardcore videogamer will probably prefer Windows.





But it's true that there's a lot of basic tasks which both can do easily. If you want to do basic word processing and Web surfing, many of those tasks are served equally well on either OS if you have a half-decent browser, and since more and more applications are being provided online over the Internet the OS is actually becoming less important to some degree.





It used to be that computer OSes were so completely different in so many ways that even though they nominally all did broadly the same things the details were so different each OS was a universe unto itself and there was no way for two OSes to communicate with one another. A few things have changed that however.





* Networking and Open Systems made interoperation between different computers a priority.


* The Internet and World Wide Web made intercommunication a much bigger part of computing.


* Many applications and file formats became standardized across OSes, eliminating many technical barriers relating to translating data.





That said, there's still technical differences in how different OSes operate, and more importantly, different kinds of software do the same things on different OSes, and often that software will affect one's preference. For instance, if one wanted to create HTML pages to put up on the Web, one could do that on either Windows or Unix, but if one likes using a friendly graphical system like MS Frontpage or Adobe Dreamweaver they'll probably prefer Windows. If one wants to get into the more technical side like setting up an Apache server especially configured to serve their content, they might like Unix better.
Reply:Personal PC, Intranet or webserver.....traffic?





Hey, windows for personal pc....can't beat the compatible programs written for windows.
Reply:If you want to play games right now Windows is better, however that will change within the next few years.





If you are wanting security for you and your files then Unix, Linux, BSD are better.





I recommend Ubuntu for Linux. or Dragonfly for BSD. I believe that Ubuntu is more complete at this time.





Also anyone that says that Windows has more programs written for it is Wrong.


Their are over 17,000 programs written for Linux and I can't think of any program that is in windows that does not have at least 3 versions in Linux or BSD that can do the same thing.





I play games so I have both operating systems in my house, however when it gets to the point that I can play the games I like to play on Linux I will not go back.


I will admit that there are still issues being taken care of by Linux at this time, however they have tens of thousands of people working on the problems and it wont take long.





I believe that BSD will be better and more stable in the end so I am waiting for it to "congeal" so I can use it. DragonFly is my hoped for favorite.





go check out their sites.


Solaris 8 UNIX script help!?

What is wrong with this script? I'm not a strong UNIX scripter, but this is for my job. I get the error: 'else' unexpected.





#!/bin/ksh





INIT=/h


DEST=/h/data





if [-n $1]


echo "usage: $0 %26lt;filename%26gt; : no filename given"


exit 1


else


if [-f $1]


echo "performing operation"


#SKIPPING ALL THE USELESS INFO


exit 0


else


echo "$1 has errors or does not exist"


exit 2


fi


fi








My problem is with the error handling...the if-thens. I don't understand them.

Solaris 8 UNIX script help!?
Few things are wrong:





1) "if" should be followed by 'then' : if [...] ; then





2) Put a space between "[" and "-n" - it matters, because "[" is implemented as command and -n is its argument





3) First condition is better written as -z "$1" - otherwise it won't work if first parameter is not specified. Use "man test" to learn more about those conditions.





#!/bin/ksh





INIT=/h


DEST=/h/data





if [ -z "$1" ]; then


echo "usage: $0 %26lt;filename%26gt; : no filename given"


exit 1


else


if [ -f "$1" ]; then


echo "performing operation"


#SKIPPING ALL THE USELESS INFO


exit 0


else


echo "$1 has errors or does not exist"


exit 2


fi


fi
Reply:doesn't Korn require a 'then' clause?





if [ condition ] then


...


else


...


fi








I also think your else-if command should be 'elif [ condition ] then'


Is there any registry for unix also like windows. If it is could you tell me about it.?

I got a question in an interview regarding registry in unix. i know in windows registry is there but i am not sure about unix. Could you please answer this.

Is there any registry for unix also like windows. If it is could you tell me about it.?
no registries...
Reply:There is no registry in Unix - Windows is he only OS with a registry. Unix still uses (mostly) conf files to store that kind of information.


What is the Difference between Windows ICMP.DLL and ICMP on HP-UNIX?

I am having trouble with our network dropping packets, when I run a traceroute from Windows it shows the dropped packets, but if I run a trace from a HP-Unix box at the same time the Unix Box doesn't show any drops. I know there is a problem because my Users who are accessing Unix across the network through a TNVT telnet session are experiencing their screens scrolling, pausing and just hanging. If I ping across the network it shows no dropped packets, not even one. Ping times run between 1ms to 14ms and nothing lost. Traceroute shows the drop on the outside IP Address of my routers. I ran traces in both directions and the drop is always on the outside of the routers. Thanks for any help on this!

What is the Difference between Windows ICMP.DLL and ICMP on HP-UNIX?
Visit this site





http://www.sockets.com/ms_icmp.htm





http://support.microsoft.com/kb/q172439/

flower names

Best way to learn Unix and Linux?

For my next job I already have lined up, I need to learn Unix and Linux commands and tricks. I just need some online sites with command listings, tricks, how the OS actually works, anything would help me start. I would like to learn how the OS works, then the commands. I have been in IT for a long time, but never with Unix mainframes and Linux OS's. If you know of the best couple of books to start, that would be great too.





Any help would be appreciated, and I always pick a best answer. Thanks.

Best way to learn Unix and Linux?
My recommendation is the following:


1. First download the latest Fedora Core and install it in your machine.


2. Buy the Redhat enterprise Linux and Fedora core 4: The complete Reference http://www.amazon.com/gp/product/0072261...


3. Buy a book on basic Korn Shell scripting


4. Try to wrrite some korn shell scripts..


5. Try to learn the vi editor


6. If you try reading Linux forum then you will understand a lot
Reply:learn unix command using mind map.


http://mind-map-you.blogspot.c... Report It

Reply:hey dude is a site from which u can learn unix in tem minutes [freeengineer.org/learnUNIXin10minutes.h... . And linux frm this one


[digg.com/linux_unix/Learn_Linux_-_Fre... ] to learn linux k buddy.


I'm trying to find out how to program in Unix via C or C++ (and which one to pick). Whre do I begin?

1) What language to use?


2) How can I tie in with a vendor's API?


3) For solaris (or other unix variant) how to I know what header files etc. to use? For instance: #include %26lt;sys/types.h%26gt; and #include %26lt;unistd.h%26gt;.


4) Network communication


5) Everything else to create a full Unix app. I mostly need to tie into other APIs.





Thanks!

I'm trying to find out how to program in Unix via C or C++ (and which one to pick). Whre do I begin?
1. Use C. You might say that UNIX and C are "made for each other", but in actuality they are made by one another. Since most parts of UNIX (and many UNIX-like OSes) were coded in C it remains a C application developer-friendly environment.





2. That really depends on the specific API and what type of program youre planning to make.





3. There should be documentation manuals or "man pages" on any decent UNIX-like OS installation you will find. This includes ANSI C man pages and man pages for several common APIs like sockets or POSIX threads. These manuals detail the functions and which header files or and/or library files are required.





4. I recommend starting with Beej's Guide to Network Programming, here: http://beej.us/guide/bgnet/





5. Just dive in! If you have a handle on the language then you can start with standard ANSI code, which will compile under ANY compiler that supports ANSI C such as gcc, which generally exists on a UNIX system. Then as you develop more and more you will become aware of the functions and libraries that you might need as you go along. IRC has several programming oriented chat rooms or "channels" which can be a good resource. Try these #c on any of these servers: irc.freenode.net, irc.efnet.net, irc.undernet.org





Good luck!
Reply:Use C++
Reply:use c++. it is OOP language so programming will be good. get a good compiler it will do all the things u want. if not then search for the library files for one in google.


How to interchange the letters in the unix. ex - MURALI is a word and now I want to interchange U and R.How?

Suppose there is file in unix like this





MURALI IS A GODO BOY.


MURALI IS A GODO BOY.


MURALI IS A GODO BOY.


MURALI IS A GODO BOY.


MURALI IS A GODO BOY.


MURALI IS A GODO BOY.


...............


..............


..............


..............





Now this file is having some thousand lines and each line ther e is a mistake in the spelling GOOD. Now what is the command in unix to inter change the letters in UNIX. Pls help me.

How to interchange the letters in the unix. ex - MURALI is a word and now I want to interchange U and R.How?
Use the sed command


sed 's\GODO\GOOD\' file %26gt;file
Reply:Vi and sed ways already covered.





Here is my bit if you are by any chance, an Emacs user.





open that file in Emacs, press Alt key, and press 'x' while Alt is still pressed. You will get a prompt like M-x in the minibuffer. There, type query-replace and press the enter key.





You will be prompted for the string to look for. Enter GODO there. press enter.





You will be prompted for the string to replace with. Enter GOOD and press enter.





You will be presented with options like replace all, replace, cancel, replace and quit, quit. Choose one to your content and you are done!





Trust me, it looks long, but you will be stupefied to see hoe easy and versatile it is. When you grow fluent with Emacs, you will find that this is a trivial work that Emacs can do.





hmm, a bit of marketing there for Emacs, eh? ;)
Reply:Learn English and Write the Whole Document Without any Mistakes, ;) I think This solves your problem
Reply:If you know vi editor means,





Open the file in the editor


Type the following in the after pressing shift + :





g/godo/s//good/g


Moving the executable in unix?

Hi all,


I am oving an executable from one unix machine to another. while compiling, I have used oracle libs installed in that system as static links. now, in my new unix box, the oracle is installed in diff directory stucture.


when I try to run the executable, it is trying to access the lib from old path.


but, I need to set it to new path....


How do I go about?


chatr or ldd will work?

Moving the executable in unix?
Yes. There is a way to overcome with this problem using chatr.





let's say the hard-coded file is as '/home/user/lib.sl' and your exe is 'myexe'





Then give the following command:





chatr -l /home/user/lib.sl myexe





The dynamic library is now fully dynamically linked, otherwise it was partially static.

yugioh cards

Uppercase to lowercase on unix?

I have a txt file on unix that I recently edited using vi, how do I convert line 18-30 all to lowercase?? What's the command for this on unix?? thanks

Uppercase to lowercase on unix?
I don't have access to 'vi' so the following may be of no use to you.





If you can run 'vim' on your system, the transformation is easy: move your cursor to line 18 with ':18', then press SHIFT-v, cursor down until the selection encloses line 30, then press 'u'.
Reply:There is no magic 'canned' UNIX command that will do this. You can get creative and execute this from the command line:





awk ' NR%26gt;=18 %26amp;%26amp; NR%26lt;=30 { for( i = 1; i %26lt;= NF; i++ ) $(i)=toupper($(i));} { print; }' %26lt;file.txt %26gt;nfile.txt





You cannot update the file in place, so you will need to write it out to a new file and move (mv) it back if you must have the changes back under the original file name.
Reply:Most likely perl is on the system. Here is a small perl script to do it.





Name the file lower.pl





#!/bin/perl


# The above line has to be the first line in the file.


$line=1;


while( %26lt;%26gt; )


{


if ( $line %26gt;= 18 %26amp;%26amp; $line %26lt;=30 )


{


$_ =~ tr/A-Z/a-z/; # convert to lower case


}


print $_;


$line++;


}





Run it like this:


chmod +x lower.pl; lower.pl yourfilename %26gt; yourfilename.new





yourfilename.new now contains the converted file.
Reply:http://vim.wikia.com/wiki/Switching_case...





In VIM, the command "guu" drops the entire line's case. So to do those lines, go to line 18 with "18G" then do the next 21 lines with "21guu".


What is your Favourite Unix One Liner?

I am trying to master UNIX and am looking for some cool Unix one liners that help you accomplish a task very easily which may otherwise be very tedious.





Thanks in advance.





Cheers

What is your Favourite Unix One Liner?
shutdown -rn 0


C or C++ for Unix programming?

I know C++ and I just started using Linux (SUSE 10.1 distro) I would like to see what I can do with C++ and Linux, but all the tutorials I look at always seem to say "learn C programming for Unix" or something of that nature. Is it not wise to use C++ when programming in Linux? I want to make programs that interact with the operating system itself, kinda of like windows and there "window services". Any suggestions?








Also if you could supply any good tutorials that deal with progrogramming in Unix that be greatly appreciated.

C or C++ for Unix programming?
C++ is just a superset of C. Use C++ for object orientated programming. If you don't need object oriented programming, for example for small projects, then use C. There's nothing wrong with C++ on Linux / Unix. It is pointless to use C++ if you aren't going to use objects (but in that case the compiled code would be equivalent to C anyway).
Reply:http://www.mindview.net/Books/TICPP/Thin...








Try this book it's c++ and the example code is available for Linux Red-hat installs the examples by default.
Reply:I found this tutorial on what you asked at this link :


http://users.actom.co.il/~choo/lupg/tuto...
Reply:just to chime in, I have a linux programming book, and all of it is in C not c++.





Not sure why that is. I know you can write and compile with gcc in C++, but they may be some reason that C is being used for the low level stuff.





Look at www.linuxforums.org


Where can I Download UNIX Simulator for Free..? I downloaded L-Nix.But it is not working properly..?

Can U tell me some other sites to download A FREE UNIX SIMULATOR...Which let's me practise all of the Unix commands I''ve learnt....Please give me the links....I don't want the L-Nix again..PlZ avoid it......

Where can I Download UNIX Simulator for Free..? I downloaded L-Nix.But it is not working properly..?
Ubuntu can run from CD.





http://www.ubuntu.com/





Cygwin provides a UNIX-like environment under Windows. http://www.cygwin.com/
Reply:use cygwin
Reply:Easiest way to play with linux is DSL (damn small linux) It will fit on a floppy or CD and you can simply put in in and boot up.
Reply:http://a4n.org.uk





Really great site! Request your download and they'll get it!

hibiscus flower

Help with using sudo in a unix shell script?

I am trying to use sudo command in unix shell script. Its that it will do sudo and then search a file in the directory and then come out of the sudo account





my account = saurav





here is the script code


********************************


sudo -u abcd -s


cd /application/somefolder/


id


grep jdbc:oracle:thin server.properties





**************************************...





now how do i come out of the account to which i sudo, i can always use CTRL+D / ctrl + x from the prompt, but what should be used in the script to get out of the account back to my own account.





which is from abcd to saurav

Help with using sudo in a unix shell script?
why must you sudo as a user, then change directories, then check the id, then do a grep? shouldn't you do it all in one go?





if you setup your sudoers file correctly, the above could be accomplished with





sudo grep jdbc:oracle:thin /app/folder/server.properties





If you really need to use your version, try


exit





or else try su saurav











Let me know if that works or not, and feel free to ask more questions


-Eric


Scipt to ftp to windows from unix?

I want to connect to awindows machine from unix and pull files from windows.

Scipt to ftp to windows from unix?
Firezilla
Reply:well you dont need a script. depending on what unix distribution you are running depends on how you go about it.


however most unix systems by default offer the 'ftp [host]' command. So open up a terminal if your running linux and type 'ftp [host]' obviously replacing [host] with the IP or hostname of the windows machine you wish to connect to.





*remember that you need to be running an FTP server on the windows machine in order to accept ftp connections*


How do i create .profile in UNIX?

I'm new to UNIX and i found that i dont have the .profile file.

How do i create .profile in UNIX?
It is just a text file containing shell script commands. Create it with any text editor (such as vim or emacs).
Reply:to add to the guy above





or pico
Reply:it's a text file. there are multiple ways to do it. If you know VI then you already know the answer. :) otherwise just do aither:





touch .profile





or





cat /dev/null %26gt; .profile





it'll create an empty file for you that you can later edit with any text editor.


Two UNIX command with appropriate option to list all hidden files ?

I know one is ls -a, what is the other command to list the hidden file in Unix?





many thk

Two UNIX command with appropriate option to list all hidden files ?
There are plenty of variations of "ls" which will work.


One is to simply specify the "." files, and then throw


in the "-d" option so that you don't get a listing of


files in the parent directory (because of ".."):





ls -d .*





Similarly, though, you can list all "hidden" files with


a simple "echo" command using the same idea:





echo .*
Reply:ls -la should "list all"





ls --help should return you a list of all extenstions for ls
Reply:This may work for you as well:





find . -print





Of course, that will list all files from current directory and below.
Reply:try ll
Reply:I don't know of another COMMAND, but the capital A option will also list hidden files in ls ( "ls -A" ). Unlike the lowercase option it does not list the directory "names" "." and ".."

flower shops

About Unix?

I would like to know the following details about Unix:-





•Structure: design of the operating system


oSystem structure – simple, layered, microkernel etc…


oKernel type – monolithic, microkernel, etc…


oUser Interface – CLI, GUI, etc…


•Process: type and management of supported process


oProcess Management – Single task, multitasks etc…


oType of process – process, thread, etc…


oProcess scheduling – round robin, FIFO, multiple queue, etc…


oAPI – Posix, Win32, etc…


•Memory: information about main and virtual memory


oAllocation: fixed, segmentation, paging etc…


oPage replacement: FIFO, LRU, etc…


oAddressing





Make it as simple as possible please. I just want the technical terms and uses and such. The commands and such are not necessary. Thank you for your time.

About Unix?
•Structure: design of the operating system


oSystem structure – simple, layered, microkernel etc… YES


oKernel type – monolithic, microkernel, etc… YES


oUser Interface – CLI, GUI, etc… YES


•Process: type and management of supported process


oProcess Management – Single task, multitasks etc… YES


oType of process – process, thread, etc… YES


oProcess scheduling – round robin, FIFO, multiple queue, etc… YES


oAPI – Posix, Win32, etc…POSIX, UNIX, C, many others


•Memory: information about main and virtual memory


oAllocation: fixed, segmentation, paging etc…YES


oPage replacement: FIFO, LRU, etc…YES


oAddressing VIRTUAL or DIRECT, BIG-ENDIAN or LITTLE-ENDIAN, 8-bit or 16-bit or 24-bit (I kid you not: Cray X-MP running UNICOS) or 32-bit or 64-bit or 128-bit, "BYTE"-ADDRESSABLE or "WORD"-ADRESSABLE





If you can name it there is probably a UNIX variant or bolt-on that supports it.


FROM UNIX - Name me a line editor, full form of PID nd PPID.?

related to UNIX

FROM UNIX - Name me a line editor, full form of PID nd PPID.?
Not exactly sure what you're looking for, but here's a list of text editors for several computing platforms:


http://en.wikipedia.org/wiki/List_of_tex...
Reply:In UNIX PID Stands for Process ID. and PPID stands for Parent Process ID.


In unix. use the more command,and content of your .profile and .shrefiles to the screen.?

in unix. use the more command,and content of your .profile and .shrefiles to the screen.

In unix. use the more command,and content of your .profile and .shrefiles to the screen.?
What is your question? first clear it


Linux/UNIX Q: what are users daemon, sys, and bin for?

On a Linux/UNIX system, what are users daemon, sys, and bin for? I looked in /etc/passwd and found that they can't log in (no shell), but they own some files, and no process is running as them.





Can anyone help me out?

Linux/UNIX Q: what are users daemon, sys, and bin for?
Hello,





These users are in charge of built in system functions, they arent actual "users" but they are required





Any userid under 500 on a linux system can basicly be considered a system user..





heres a general list:





backup: historical, probably safe to remove


bin: historical, and possibly used


daemon: historical, commonly used by daemons that need to own files, but can't


have their own user for some reason


games: placeholder for group games, don't remove it


irc: used for irc daemon(s), probably not necessary


list: I don't know


lp: used for printing daemon(s) and as a placeholder for group lp, don't remove


unless you don't have a printer and have no printing software installed


mail: placeholder for group mail, sometimes used by mail daemon(s), don't remove


man: placeholder for group man, don't remove unless you don't use the man


command


messagebus: I don't know


operator: historical, probably safe to remove


proxy: almost definately safe to remove unless you run any proxy server(s) that


use it


sync: I don't know


sys: I don't know


uucp: if you've never heard of it, you probably don't need it











Please note we dont reccomend you remove ANY account under userid 500 ever.





to remove a real user you added use userdel username











Hope it helps!




















Blue chip hosting staff,


bluechiphosting.com


http://www.bluechiphosting.com

flower power

LINUX/Unix file system question?

If you think about it the LINUX/Unix file system treats everything like a file. Maybe you have started to realize this as you look through the material. This is a important concept to realize when administering and troubleshooting LINUX. For example what directory might you look in if you are having trouble with a USB device you are trying to use? How about to check printer or email queues? At a high level what might you be looking for in them to jump start your troubleshooting?

LINUX/Unix file system question?
Usually you have to mount usb devices. I.E. if you want to mount a flash drive issue the command





mount /dev/sda1 /mnt/usbflash





now you can use it as that directory.





High level is not a reality in Linux sometimes you have to get down and dirty but it is not hard.





print queue depends on where your print software (like cups) is storing the log I would look in the configuration of your print software to see where it is storing logs. This goes for all programs running including email queues.





usually the configuration is in the /etc/ directory.





Email logs are usually in the /var/log directory.





RJ


Can sum 1 com in the Unix room on Pokemon diamond?

can sum 1 come in the unix room today at 11:00 am plz on pokemon diamond DS

Can sum 1 com in the Unix room on Pokemon diamond?
ok ill try and be there
Reply:The union room is for people who are close to each other like 2 metres away not for people who live far away your looking for the bottom of the pokemon centre in any pokemon centre to the wi-fi club and ill be in there im online now give me your name and code heres mine


SIMON (all capitals)


Code: 2234 6938 8727


Thnaks ill trade you and battle you do you have any pokemon from ruby and sapphire thanks!!


Help with a C program in unix.?

I'm trying to write a small program in Unix in C to get commands from the command line and then perform them. ie., filename.c dir = ls... But, I can't quite figure out how to move the command from argv[] to the system command. This is what I have so far:





#include %26lt;sys/wait.h%26gt;


#include %26lt;unistd.h%26gt;


#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;





int main(int argc, char *argv[])


{





system = argv[1];





if (argc=2 )


{


if (status="clr")


{


system ("clear");


}





if (status="dir");


{


system ("ls");


}





if (status="environ")


{


system ("environ");


}


}


else (status="quit");


{


system (exit);


}





}

Help with a C program in unix.?
You're comparing strings, not integers.





if( strcmp( argv[1], "dir" ) == 0 ) {


system("ls");


}