Basic unix interview questions ebook


















Any word containing a wild-card is replaced by a sorted list of filenames that match the pattern. The list of these filenames then forms the arguments to the command. What difference between cmp and diff commands? It searches for the pattern, specified in the command line with appropriate option, in a file s.

Syntax : grep. Example : grep 99mx mcafile. What is the difference between cat and more command? Cat displays file contents. If the file is large the contents scroll off the screen before we view it. So command 'more' is like a pager which displays the contents page by page. Write a command to kill the last background job? Which command is used to delete all files in the current directory and all its sub-directories? What will the following command do? It is similar to 'ls' command and displays all the files in the current directory.

Is it possible to create new a file system in UNIX? Is it possible to restrict incoming message? What is the use of the command "ls -x chapter[]". If so, what is its use? With the help of this command you can find the disk capacity and free space of the disk. Is it possible to count number char, line in a file; if so, How?

Yes, wc-stands for word count. Name the data structure used to maintain file identification? How many prompts are available in a UNIX system? How does the kernel differentiate device files and ordinary files? Kernel checks 'type' field in the file's inode structure. How to switch to a super user status to gain privileges? The system asks for password and when valid entry is made the user gains super user admin privileges. What are shell variables? How do you find which process is taking how much CPU?

By using "top" command in UNIX. How do you check how much space left in current drive? By using "df" command in UNIX. For example "df -h. How do you know if a remote host is alive or not? You can check these by using either ping or telnet command in UNIX.

How will you run a process in background? How will you bring that into foreground and how will you kill that process? For bringing it back in foreground use command "fg jobid" and for getting job id you use command "jobs", for killing that process find PID and use kill -9 PID command. How will you find which operating system your system is running on in UNIX? By using command "uname -a" in UNIX.

What is the command to list all the links from a directory? How will you create a read-only file in your home directory? You need to create a file and change its parameter to read-only by using chmod command you can also change your umask to create read only file. What is the difference between Swapping and Paging? Swapping: Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory.

It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems. Paging: Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter.

Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously.

Allows the greater process size than the available physical memory. This interface allows the user to type declarative commands to instruct the computer to perform operations.

CLI offers greater flexibility. However, other users who are already accustomed to using GUI find it difficult to remember commands including attributes that come with it. GUI, or Graphical User Interface, make use of images and icons that users click and manipulate as a way of communicating with the computer. Instead of having to remember and type commands, the use of graphical elements makes it easier to interact with the system, as well as adding more attraction through images, icons, and colors.

To open the default shell which is where the command prompt can be found , press Ctrl-Alt-F1. This will provide a command line interface CLI from which you can run commands as needed. You should see a line starting something like Mem: , etc. This is the total memory Linux thinks it has available to use. The preferred size for a swap partition is twice the amount of physical memory available on the system.

If this is not possible, then the minimum size should be the same as the amount of memory installed. Symbolic links act similarly to shortcuts in Windows.

Such links point to programs, files or directories. It also allows you instant access to it without having to go directly to the entire pathname. Yes, it does. Just like Windows, you can use this key combination to perform a system restart. In Linux, each drive and device have different designations.

Assuming you are the system administrator or the owner of a file or directory, you can grant permission using the chmod command. TXT, which is assigned to groups and others. Linux assigns numbers at the end of the drive identifier. Hard links point directly to the physical file on disk, and not on the pathname.

This means that if you rename or move the original file, the link will not break since the link is for the file itself, not the path where the file is located. Any filename can have a maximum of characters. This limit does not include the path name, so therefore the entire pathname and filename could well exceed characters.

In general, filenames that are preceded by a dot are hidden files. These files can be configuration files that hold important data or setup info. Setting these files as hidden makes it less likely to be accidentally deleted. This serves as an alternative to minimizing and maximizing different windows on the current desktop. Using virtual desktops can clear the desktop when you can open one or more programs. To share a program across different virtual desktops, in the upper left-hand corner of a program window look for an icon that looks like a pushpin.

This empty directory name serves as the nameless base of the Linux file system. This serves as an attachment for all other directories, files, drives, and devices. Daemons are services that provide several functions that may not be available under the base operating system.

Its main task is to listen for service request and at the same time to act on these requests. After the service is done, it is then disconnected and waits for further requests. Assuming you have these two environments installed, just log out from the graphical interface. Then at the login screen, type your login ID and password and choose which session type you wish to load. This choice will remain your default until you change it to something else.



0コメント

  • 1000 / 1000