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 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 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 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 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

Write a shell program called whos to display a sorted list of the logged in usersJust display the user names and no other information?

The 'users' command should do that; you don't need to write a shell script to get that information in that format.

What is the generic syntax for all UNIX command?

The generic syntax for commands is:

command-name options-or-parameters

The first non-blank field is always the command to be executed. Following that are either options (starts with a - or +), and any other non-blank field would be considered a parameter. An example:

cc -O -o testing -n -s -x main1.c sub1.c sub2.c

In unix Which command do you use to assign a socket to a specific address?

There isn't a generalized way from the command line in Unix to connect to a socket; there are socket libraries you can utilize from within the 'C' language to assign, bind, and connect to a specific socket address. For example:

int connect(int s, const struct sockaddr *name, int namelen);

In Linux, you can use the 'socket' command to connect to a specific socket as:

socket ?options? host port

Where the host is the IP address and the port is the port number (giving you the socket address).

How do you sum numbers in a Unix shell script?

try a for loop:

for x in 1 2 3 4

n=0

do

n=`echo $x+$n`|bc

done

Integer arithmetic can be done in the shell itself without requiring an external program, making the operation much faster:

n1=123

n2=543

sum=$(( $n1 + $n2 ))

echo "$sum"

How can you make out whether two files are copied or linked in unix?

Use the long listing function of 'ls'. You will see a link count > 1 and a reference to where the file is linked to if it is a link. Without a link it is a copy.

How can you append the output of a command to a file?

Use the append I/O redirection operator: >>

An example would be:

echo "Put this at the end of the file" >> aFile

Which takes the output of 'echo' and puts/appends it to the end of the file aFile.

What is swapping in operating systems?

When you load a file or program, the file is stored in the random access memory (RAM). Since RAM is finite, some files cannot fit on it. These files are stored in a special section of the hard drive called the "swap file". "Swapping" is the act of using this swap file.Aswapping is a mechanism in which a process can be swapped temporarily out of memory to a backing store and then brought back into memory for continued execution.

Write a shell script where you check whether the name begins with A and ends with t?

You haven't specified what the 'name' is, so it is not possible to answer the question.

What is the purpose of the chown command?

It changes the ownership of the file/device/directory to a specified user.

He shell standard variables are called metacharacters?

Shell metacharacters are special characters that have meaning in a Unix shell. For example, the '$' character followed by letters indicates that the shell variable with that name should have its value substituted.

str=hello

echo $str

will echo out 'hello'. Other metacharacters include the semi-colon (for multiple commands on the same line), the backslash character for escaping special meanings, the single and double quote for combining fields, these are all metacharacters.

A metacharacter changes the interpretation of things in various ways.

Can command rmdir can be used to delete a directory that is not empty?

the commandrmdir will not remove a directory if it is not empty in UNIX. The correct way to

remove a directory and all its contents recursively is with the rm

command.

What is the ls -F command?

Lists your files in the directory and allows appending of indicators (one of */=@|) to entries

Difference between booting and mounting process?

"Booting" refers to the process is bringing a machine up, usually from the power-on standpoint. The boot process brings in the operating system a piece at a time and initializes the system. The final part of a boot process is usually the log-in screen.

"Mounting" refers to adding a file system from another source, either a remote computer or a remote device, such as a flash drive. This has to be done while the system is running, i.e., after it has "booted" and is in a running state.

Is there a timer command for the Linux terminal?

Use "man time" in a Linux terminal (without the quotes) to view the manual page for time. There are commands to show elapsed time a program runs, when a program is to start, etc. For a simple example, this 'Egg Timer' command: echo -e '\a' >&2; sleep 180; echo -e '\a' >72 will show a blank terminal for 180 seconds. Or 3 minutes, (which is enough to cook a soft-boiled egg!).