answersLogoWhite

0

📱

Unix

Unix is a family of operating systems primarily designed for servers, mainframes, and high-end workstations. First created in 1969, Unix systems are renowned for their security and stability.

1,127 Questions

What are some Examples of time sharing operating system?

A special case of multiprogramming in which users access the computer through terminals, typically the devices with keyboards and screens. Dozens of users share the computer at once. The computer actually does not run them all simultaneously but it runs a small portion of ones user's job then moves the service to the next user providing service to each user several times and then it appears that is is actually doing all its actions at one time but it's not. After all the requests are done they all get responses about the same time.

What are the advantages of the proprietary operating system?

there are plenty of advantages of proprietary os.u can enjoy the features which others cant have by just accessing net to install ur os..because its not open source operating system

When might it be necessary or advisable to write a shell script instead of a shell function?

A shell function will do nothing unless it is explicitly called by other code, typically in a shell script. A shell script is a runnable, executable process, which can call other shell scripts and/or functions.

The question might be worded backwards - it is necessary to write shell functions for shell scripts when certain logical functionality is required to be performed multiple times. Consider a shell function equivalent to a program subroutine - they operate the same way.

Unix is CUI or GUI?

Unix is an operating system that provides a Common User Interface (CUI) for controlling a computer. Thus CUI can run an application that provides a Graphical User Interface (GUI) which makes controlling what the computer does a little easier (e.g. GNOME - The GNU Object Model Environment).

What is recursive behavior command in UNIX?

There a lot of command that could be used with recursive option in UNIX type operating systems and even Windows. For example we want to list of files and folders inside current folder but we want to list and all subfolder and even subsubfolders and etc. For this we will have to use recursive option.

Example:

Command: ls -laR

Return:

-rw-r--r--@ 1 david staff 373 Bal 26 18:13 add.sh

-rw-r--r-- 1 david staff 31 Bal 26 18:12 even.txt

drwxr-xr-x 3 david staff 102 Kov 20 18:46 ruby

drwxr-xr-x 2 david staff 68 Bal 15 07:24 C

./folder:

total 0

drwxr-xr-x 2 david staff 68 Bal 26 16:55 .

drwxr-xr-x 16 david staff 544 Bal 26 18:11 ..

./ruby:

total 8

drwxr-xr-x 3 david staff 102 Kov 20 18:46 .

drwxr-xr-x 16 david staff 544 Bal 26 18:11 ..

-rwxr-xr-x@ 1 david staff 181 Kov 20 18:59 test.rb

As you can see it not only listed files from active directory, but also listed and files from other two directories that are located in active directory.

There are many programs that allows this kind of recursion (usually it will be -R option) and some even will allow to limit the depth you want. In order to find out which commands support recursive option you need to read each command manual pages, which could be in internet or in system by writing in console: man

To write a c program that counts number of blanks in a text file using standard io in unix?

#include<sys/types.h>

#include<sys/stat.h>

#include<unistd.h>

#include<fcntl.h>

#include<stdio.h>

int main()

{

char str[100]="abc d e f gh";

int c=0;

int fd,n,i;

n=strlen(str);

fd=create("multiple.c",O_WRONLY);

write(fd,str,n);

close(fd);

printf("file created /n");

fd=open("multiple.c",O_RDONLY);

read(fd,str,n);

for(i=0;i<=n-1;i++)

{

if ( str[i] == ' ' )

c++;

}

printf("no of spaces =%d",c);

}

Which attribute is used in script tag to specify a file containing the java script statements?

The script tag will have the "src" attribute to identify the location of the script's contents.

Program to generate a multiplication table of 5 in Unix?

$vi multable.sh

n=5 i=1

for i in 1 2 3 4 5 6 7 8 9 10 11 12

do echo " $n * $i = `expr $n \* $i`" done

What are the two ways you can execute a shell script when you do not have execute access permission for the file containing the script?

To do this you will need at least read permission; if you don't have that then you will not be able to execute the script at all.

One way is to copy the script to your directory and add the execute permission.

The second way is to call the correct shell interpreter program directly, as in:

ksh /some/file/shell

What are forked sockets?

A forked socket relates to two or more processes using the same socket. When a process terminates, it should close the socket, however the socket remains open until the final process terminates. This is typically achieved through reference counting.

How can you use utility programs and shell prompt to create your own applications?

You'll have to learn some shell scripting. for example, in the terminal :

$vi hello.sh

will create a file hello.sh for you to write into.......sh extension is needed

suppose you typed in

"echo hello world"

and saved the file [press escape and then shift+z+z]

then when u type in ./hello.sh in the terminal, the following message will be displayed :

hello world

That's how it starts!!!

All you need!

A clarification on the above answer: the extension .sh is not required, since Unix does not need extensions of any kind. It is, however, helpful to include it for documentation purposes (so you know what the intent of the file is).

Secondly, the shell file created above will not execute unless the permissions are set appropriately. They should have 'read' and 'execute' permission to run on the command line as described above.

The Unix file contains which kinds of fields?

The Unix file contains which kinds of fields?

Why shell is not a part of operating system?

Because if it was, the system would be MUCH more prone to crashing(also known as Microsoft Windows).


Actually, a shell IS part of an operating system. "Operating System" encompassing not just the kernel, but also a standard set of utilities and libraries which provide a defined API.

For example, the UNIX Operating system include the Bourne Shell as a part of its specification, as well as a specific C library, and filesystem utilities such as 'ls', 'grep', etc.

Obviously, as there a large number of shells around, a specific shell may NOT be part of a specific Operating System.

Did DreamWorks company uses unix operating system?

I know that at one point Dreamworks had a lot of SGI machines, which were running Irix, the SGI flavor of Unix.

I'm not certain what they use now.

Is unix a graphical user interface?

No, its an operation system.

But many GUIs have been written to run on unix.

Unix is not a graphical user interface (GUI). It is an operating system that originally did not have a graphic interface and still does not have a GUI interface as part of the system. The standard user interface in UNIX is a command line as in a terminal session, similar to a windows command line interface.

Various graphic user interfaces are available for the unix and linux platform. Nearly all are based on the X Windows System (or X or X11 for version 11). X is a system for describing via API (program calls) and tables all the parts of a GUI including window attributes, position, boundaries, menus, mouse/pointer and input support. Nearly all unix/linux implementations as well as some other systems use X to create the windowing environment from the simple TWM (Tab Windows Manager) to DecWindows, Motif, CDE (Common Desktop Environment), to Gnome, KDE, xfc, and many more.

It wasn't just a GUI environment for a computer. It was a client/server environment that allowed remote control of a machine from elsewhere on a network or the internet. The commands to start the windowing environment on your machine also allowed you to specify that all the graphic display output generated on your machine from your session (the client) should be sent to another machine running an X windows Server.

What is General characteristics of optimal operating system?

What exactly do you mean by 'optimal operating system'? If you don't define the term there is no way to answer the question.

What is unix operating system?

Unix is one of the oldest but still most popular Operating Systems. It was invented in 1969 at AT&T Bell Labs by Ken Thompson and Dennis Ritchie. All the contemporary operating systems of Solaris, HP-UX, Linux, AIX are variants of Unix.

What was unix originally written for?

Unix was originally developed because there was surplus electronic equipment around Bell Labs, and some of the researchers who used the Multics system for research and publishing purposes could not get their work done.

Unix was originally developed to help with publishing research and reports in a multi-user system to be used along side the Multics multi-user operating system.

Write a unix shell program to print the prime numbers?

i=2

rem=1

echo "Enter a number"

read num

if [ $num -lt 2 ]

then

echo "$num is not prime"

exit 0

fi

while [ $i -le `expr $num / 2` -a $rem -ne 0 ]

do

rem=`expr $num % $i`

i=`expr $i + 1`

done

if [ $rem -ne 0 ]

then

echo "$num is prime"

else

echo "$num is not prime"

fi

Write Shell programme to check number is perfect or not?

Write a shell program to test whether the given number is a perfect number or not.

#include
#include
void main()
{
int n,s=0,i;
clrscr()
printf("s=");
scanf("%d",&n);
for(i=0;i{
if(n==s)
printf("prfect");
else
printf("not");
getch();
}

Which came first C or Unix?

Unix was created first. The C programming language was created for Unix.

What is exec system call of UNIX operating system?

The exec family of UNIX system calls will overlay the current process with another process. It can be used to "chain" a series of programs to run together. When used with the "fork" system call it allows multi-tasking to occur.