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 does chmod 654 stand for?

chmod is a utility that allows you to change the file permissions. The octal value 654 equals to -rw-r-x-r-- (or drw-r-x-r-- if it's a directory). This means that the file owner can read and write to the file (but not execute), users in the file's group can read and execute (but not write), while for everyone else it's read-only.

Explanation

  • The "read" permission is assigned the value of 4
  • The "write" permission is assigned the value of 2
  • The "execute (program)" permission is assigned the value of 1
  • A "revoked" or "rejected" permission has the value of 0

You add these up according to what permissions are granted, except if the permissions for any one of the following categories are revoked or rejected (e.g. 000[probably not practical or possible] = nobody can access the file).

  • There are 3 digits, and the first digit is for owner, the second is for group, while the last one is for all.

What kind of files are found in the usr directory?

the /usr directory is used to contain programs, libraries, and documents that most users on the system should have access to.

How do you make your home directory the working directory?

Use the 'cd' command without any target; that always puts you in the home directory which becomes by default the working directory.

How would you list all the processes running vi?

Within the 'vi' editor, use the '!ps' command with the correct options, depending on the Unix version or variant.

What are 'slices' in Solaris?

Slice is nothing but partion, This is used in Solaris or Unix Platform. You can divide your Hard disk Drive into slice or partion.

Unix script to calculate average of n numbers given by user?

You really don't want to do this in a shell script - scripting languages in Unix typically do not handle or work with floating values, only integers. A better way would be to write a program to do this that works under Unix, such as a 'C" program.

See the related link for an example

How do you connect to a database using unix command?

There isn't a generic Unix command to connect to a database. The actual commands are based on the database package you are using, such as Oracle, SyBase, etc. They each have their own commands for gaining access to the database.

Witch line of operations system has recently become more similar to UNIX?

Linux, and the BSD-derived versions (FreeBsd, PCBsd, etc.)

In unix echo prints?

Echo repeats whatever you put on the command line.

echo This is a test

will echo to the screen:

This is a test

Does SSH have NOP's like the one described at Wikipedia?

The abbreviation NOP does not appear on Wikipedia's page on Secure Shell, not any of the other pages that are listed on the disambiguation page for "SSH." Nor do any of the terms that NOP could possibly refer to.

What is the purpose of setting accounts in UNIX?

For security- every user needs to have an account and password. This also indicates who owns the files and directories on the system and what groups the users may belong to.

How do you copy something to the Root directory?

if you are in the directory with the file you want to copy (for example file.txt)

cp file.txt /

should do it

What is an example shell script to print a certain range of lines of a file?

This can be done any number of ways in the Unix operating system. Using 'sed', you can use the address range to limit what you are printing, such as:

sed -e '1,5p' < filename

To just list lines 1 - 5 of a file, or the AWK or Perl scripting languages to do the same type of thing.

Why would you want to export a variable in Unix?

You export a variable in one process so that a child process can have the value as well. If you don't export the variable then the child process cannot see it.

What is the mv command in Unix?

The mv command is used to move a file or directory to another location. Its syntax is

mv target destination

For example:

mv myfile /home/user/mystuff

What is the difference between an interactive and noninteractive shell?

An interactive shell is attached to a console and usually needs to interact with a person to provide answers. etc.

A non-interactive shell won't stop execution to ask anyone and can be run unattended by the system. It also doesn't have an associated terminal for output.