Sys V or BSD derivated UNIX


 
Thread Tools Search this Thread
Operating Systems BSD Sys V or BSD derivated UNIX
# 1  
Old 06-23-2008
Sys V or BSD derivated UNIX

I read it was possible to distinguish if UNIX system on the machine is derivated from Sys V or BSD. The instruction said:

ps -ef ... is functional on Sys V
ps ax ... is functional on BSD

But since I don't have any UNIX machine (just Linux) I can't tell how I may use this knowledge in my script.

My idea is that ps -ef returns non-zero exit code on BSD and ps ax returns non-zero exit code on Sys V.

Is my idea right?

Thank you

(it's a question rather more theoretical than practical, I need it to school)
# 2  
Old 06-23-2008
On BSD both -ef and ax return 0 on exit.
A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually may be interpreted as an error code.

Last edited by danmero; 06-23-2008 at 05:47 PM..
# 3  
Old 06-23-2008
So that I have to check the error message from ps on BSD to distinguish it from Sys V?

Quote:
A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually may be interpreted as an error code.
I know. But I don't know what part of my message made you to write it.
# 4  
Old 06-23-2008
The BSD part, for Sys V you have to digg for yourself.
# 5  
Old 06-24-2008
In theory this might work, but all "real existing" UNIXes are some sort of "best of both worlds" nowadays.

AIX (as well as HP-Ux and as far as i know SunOS) will understand both syntaxes, "ps -ef" as well as "ps caux".

the same goes (in AIX, other UNIX dialects i do not know in-depth) for the printing/queue management subsystem, which is different in SysV and BSD. In AIX both the SysV variant and the BSD variant are understood, because both command groups are only frontends to a AIX-native subsystem, which is different from both.

There are 100%-BSD implementations out there (netBSD and FreeBSD for instance), but i do not know of any pure SysV-implementation that is worth noticing. (SCO? Please, have mercy....). So probably the best real-world-approach is to look into the output of "uname" and decide based on a translation table. Still I'd think that this distinction is merely academic nowadays, for reasons given.

I hope this helps.

bakunin
# 6  
Old 06-24-2008
Thank you very much
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies

2. Shell Programming and Scripting

ftp files from local sys to unix server

Hi All, can anybody explain me how to ftp files from local system to unix server using Shell scripting without using any softwares. i have developed some code but its not wrking. lclpath=/dba58/d039/ftppubd/ajay echo $lclpath cd $lclpath user='rajesh' pswd='rajesh' host="3.209.136.253"... (5 Replies)
Discussion started by: rajesh_pola
5 Replies

3. AIX

Help training for Unix Sys Admin

I have worked on AIX for a number of years now and want to upskill to Sys Admin. My problem is my employer won't give root access etc to their servers so I must find my own way of training. Can anyone suggest a virtual environment I could use to train for AIX sys admin tasks, or suggest an old... (7 Replies)
Discussion started by: jackmeadow
7 Replies

4. UNIX for Dummies Questions & Answers

The mini hardware requirment for standard Unix sys.

Hi I am a new comer for Unix sys. My Unix experience just less than half a year. Now Im going to purchase a notebook to install Unix system, but I have no idea of the mini setting for the laptop that are able to run Unix fluently. Is that anyone can tell me? Please give more options or... (1 Reply)
Discussion started by: Julius
1 Replies

5. BSD

for linux and BSD users interested in Unix system V/bsd

for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide. ... (0 Replies)
Discussion started by: moxxx68
0 Replies

6. UNIX for Dummies Questions & Answers

How to get hired as a Unix sys admin?

What do employers look for? I have my B.S in Comp Sci and minor in chemistry from UNC. But my GPA is a bit low (3.0) I'm studying for my Sun Solaris 9 certification. Is a certification and a Bachelors enough to get a job? Or do you need some related work experience? How hard is it to... (2 Replies)
Discussion started by: CapsuleCorpJX
2 Replies

7. Solaris

Differences Sys 5 and BSD

Hi I would like to know the difference between System V release and BSD style release. Regards, Raja (2 Replies)
Discussion started by: RajaRC
2 Replies

8. UNIX for Dummies Questions & Answers

BSD Sys 5????

Since I failed a test that I didn't have the chance to study for, my wonderful instructor told me to write a paper about BSD sys 5. I can't find anything...does it even exist yet??? If you have any input, I would love you forever if you can enlighten me ASAP. (2 Replies)
Discussion started by: Toughgirl27
2 Replies
Login or Register to Ask a Question