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

Description of set commands in UNIX?

'set' commands vary depending on what shell program you are using. All of them (for each shell) are documented in the 'man' command or 'info' command for that shell. For example, 'man csh', et al.

Why UNIX is programmer friendly rather than user friendly?

There's no such thing as "user-friendly." User-friendly is a term used to arbitrarily describe how easy something is to operate or use, without any sort of common reference point. Almost any sort of computer, for instance, is difficult to use if you can't read or write and don't speak any of the languages on the computer. A famous quotation with regards to Unix is "Unix is user-friendly. It just isn't promiscuous about which users it's friendly with."

The above answer is a very good answer to the question; I would just add that Unix was developed initially for other technically minded users, and wasn't for non-technical end users at the time. Everything that was done was done for users that were technically proficient in the C language (for example) and that wanted to get things done in an efficient (for them) manner.

How could you easily return PATH to its original value after deleting it accidentally?

Assuming you know what the original path was, just retype at the command prompt:

PATH=... whatever you had before ...

Or:

log out of your session and log back in again.

What is the sed command in Unix?

The 'sed' command is the Stream Editor. It is a batch, non-interactive editor to use when you know ahead of time what kinds of edits you want to do on a file. Most editors are designed to be used interactively, in real time, when editing files. This program is not. It is used very commonly with unattended scripts running by themselves with no user monitoring them.

Can you kill init process in Unix systems?

If you are the super-user you could kill the init process, however, it isn't recommended since no new tasks would be spawned and the system is likely to crash shortly thereafter.

How do you find the largest file in Unix?

There is no simple command available to find out the largest files/directories on a Linux/UNIX/BSD filesystem

you can easily find out list of largest files/directoris:

du -a /var | sort -n -r | head -n 1

How do you combine two files without duplication using unix command?

let the first file be a.txt ,second be b.txt and the third one (final file) be c.txt

The command would be

cat a.txt b.txt | sort -u >c.txt

cat a.txt b.txt will combine the two files (with duplicates)

| (pipe) will take the output of the previous command and send it as input the next command sort -u

sort -u will sort it in ascending order taking only the unique values

sort -u > c.txt will send the sorted unique values to c.txt file

cat a.txt,b.txt give 1 2 3 4 5 6 5 6 7 89 10

sort -u will give 1 2 3 4 5 6 7 8 9 10

this output is then stored in c.txt

hope this was what you were looking for

Is Linux part of Unix or it is an advanced version of Unix?

It's neither. Linux is its own family of operating systems. It is modeled after Unix and shares many design goals, but it is not completely inter-operable. Also, to be legally called a "version of Unix", an operating system must go through a rigorous and expensive certification test, which no Linux distro has currently done.

No. Linux is not an *anything* Unix.

How can you learn all files in unix?

If you are asking about all commands (which are in fact, files) then the best way to learn how to use them is to use them frequently. Learning about "all" commands is not possible because new ones are created all the time, and it isn't necessary to learn all of them.

Usually all it takes is a subset of what you need to use on a day to day basis.

How do you install PHP?

The PHP manual has an elaborate guide on setting up PHP on the major operating systems. It is updated frequently, and is easy to understand for mid- and novice-level programmers. It will usually be bundled in a program for running a webserver such as Apache 2.4.

Why is it unwise to allow superuser root to log on directly using SSH?

Any time a super user is logged on, changes can be made to files, sometimes without additional warning or approval. This could spell disaster for the file system or computer.

What does AIX stand for?

Advanced Interactive eXecutive when referring to IBM.

Why windows is multitasking and UNIX is multiprogramming?

Not really a true statement; both Windows and UNIX have multi-tasking and multi-programming capabilities.

How do you send a file from Windows to a Unix printer I can send the file to the Unix itself but I need to be able to send a file from Windows straight to a Unix printer Does anyone know how?

There are several ways. One is to have Samba configured on the Unix system so that the Windows system has access to it.

Another way is to install the lpr service for windows (most Windows servers now have that service as an installable service). 'lpr' is the Unix printing spooler which would allow you to use the lpr command in windows to print to a Unix printer.

Is there a whole disk encryption tool for Sun Solaris?

No there is not.

But ongoing efforst include

http://www.opensolaris.org/os/project/loficc/

and

http://opensolaris.org/os/project/zfs-crypto/ estamated available in the Q4 release of 2009.

Does Bash provide any mechanisms for limiting resource usage in Unix?

Limiting certain types of resource is done by the 'ulimit' command.

What is the difference between Solaris and FreeBSD?

Both Solaris and FreeBSD share a common idea base. The BSD distribution from Berkeley was the starting point for FreeBSD and for SunOS, which is the earlier version of Solaris.

As it stands, FreeBSD was developed primarily for the Intel-based chip, whereas Solaris runs primarily on the SPARC chip developed by Sun Microsystems (now part of Oracle).

Lastly, Solaris is a proprietary, cost-based version of Unix, whereas FreeBSD is an open-source version.

Can use the sed command to remove unwanted lines of text?

Yes, the 'sed' command is designed for that purpose (among other reasons, of course).

As long as you know what the unwanted lines consist of you can create a search pattern to match it. Then, have sed delete the line by not copying it to the output stream.

How do you move files in an operating system?

In *nix systems(Linux, Mac OS X, BSD, etc.) you can use the 'mv' command, in Windows-based systems use the 'move' command.

Both types of systems usually allow you to drag and drop (or cut and paste) in a graphical environment.

What is ioctl system call?

The ioctl system call is a low level I/O system call that allows the developer a fine-grained ability to change certain things about devices. For example, it can let you use asynchronous I/O handling instead of synchronous, blocking or unblocking, etc.

Since this is such a low level command the abilities will vary widely with the Operating System and the actual device. It should only be used by device handling code that knows exactly what the effect will be.

When you insert a CD into your mac it spits it back out?

If all CDs are rejected it would suggest something is wrong with the drive which may need replacing or just need cleaning. If some discs are accepted and others rejected it would suggest that there is something wrong with the rejected discs which may be scratched or just need cleaning.

Why is Unix portable?

Unix was rewritten in the C Programming language and not in assembly language. The migration from assembly language to the higher-level language C resulted in much more portable software, requiring only a relatively small amount of machine-dependent code to be replaced when porting Unix to other computing platforms.

(mihir)