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

Write a shell script to direct the odd and even numbersgiven by the user to the respective files name oddtxt and eventxt?

Here is that kind of script:

#!bin/bash

# Checking parameters number, we need two parameters

if [ $# -ne 1 ]

then

echo "Wrong number of parameters, please try again."

exit 1

fi

# Checking if number is odd or even

if [ $[$1 % 2] -eq 0 ]

then

echo "Even"

# Write number to even.txt file

echo $1 >> even.txt

else

echo "Odd"

# Write number to odd.txt file

echo $1 >> odd.txt

fi

exit 0

This bash script accepts one parameter - number and if number is even it is written into end of even.txt file and if odd into odd.txt.

Bit depth does not affect file size?

Actually, Bit depth will affect file size. For example:

1-bit=2kb 4-bit=21kb 24-bit=24kb

What is ppid in PS command?

The ppid field is the parent's process id. This is the process that 'owns' the current process.

How do you find the Apache version in Solaris?

apache -v

or

httpd -v

should return the version information.

How do you change the root shell in unix?

Your login shell can be changed by using the chsh or ypchsh command.

What service does the UNIX Web Hosting company provide?

UNIX Web Hosting Company provides different services for businesses. It is basic web hosting that delivers a maximum reliability on the FreeBSD. They offer 3 differnt UNIX Hosting packages starting from Starter to Advanced UNIX Hosting. They also offer a variety of business tools for your website.

What does the shell ordinary do while a command is executing?

While the command is executing, the shell waits for the process to finish.

How do you move a process from the background to the foreground in Vi Editor?

You don't. Moving from foreground to background, etc., happens outside of the 'vi' editor.

Write a shell program in unix to find palindrome of the number?

echo "Enter number:"

read num

r=0

d=0

a=$num

while [ $num -gt 10 ]

do

d=`echo $num % 10 |bc`

r=`echo $r \* 10 + $d |bc`

num=`echo $num / 10 |bc`

done

d=`echo $num % 10 |bc`

r=`echo $r \* 10 + $d |bc`

if [ $a -eq $r ]

then

echo "given number is polindrome"

else

echo "given number is not polindrome"

fi

Can the top command be used to change the priority of processes?

Yes, certain versions of 'top' can change process priorities. However, you need sufficient priviledge to do that.

How do you add text to your animations?

If you are talking about adding text to animations using Windows Movie Maker, click on the "Titles and Credits" option in the Task pane. Follow the instructions.

Is the command that allows a user to see the path at all times next to the cursor?

Yes, you can do this quite easily. Using the PS1 shell variable, set it (depending on shell) to something like:

PS1='$PWD :'

That will always show the current path of where you are. Just be aware that if the pathname is really long it makes it difficult to see what commands you are typing in.

What is the maximum size of a file in Unix?

The maximum size of a file in Unix depends on two things: the word size of the kernel, and the setting for LARGE_FILE support on the file system.

For 32 bit system the maximum default would be about 2 gigabytes.

For 64 bit systems or ones with LARGE_FILE support, the maximum would be approximately 264

What is the function of Vi editor?

'vi' is the standard text editor for Unix. You use it to edit content of a text file.

What is script file?

Do you mean script file loaded in an HTML document, via the <SCRIPT src=filename> tag? If so, define one or more functions within that file, and pass parameters to the function[s].

Or do you mean client-side stand-alone scripts, executed by the script host? If so, pass arguments on the command line, after the script name, and access them within the script using the WScript.Arguments object.

What are the features of xenix?

The features of Xenix include its AT&T Unix base, supporting libraries, and text editor. Other features of Xenix are semaphores and file locking.

What is the difference of grap fgrap and egrad commands of unix?

The difference between the grep family of utilities is based on what and how they search for patterns, from simple to complex. This also determines the speed at which they can analyze the patterns.

fgrep works on a single string in a file

grep uses regular expressions (one) to find patterns in a file or files

egrep is an extended version (most complex) that finds multiple patterns in a file or files by using multiple regular expressions.

What are the disadvantages of Nexenta?

Nexenta (and any other system built on the OpenSolaris kernel) currently has very poor device support. Outside of Ethernet cards, you stand a pretty poor chance of having supported hardware. This will hopefully improve in time.

How do you check NFS mounts on HP-UX 11.23?

It depends on what you are checking. You can use the 'df' command to see what is currently mounted via NFS and the 'mount' command (or check /etc/fstab) for mountable file systems.

Write command to show all files and directories?

If you want everything, start at the root directory and issue the command:

ls -R