Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Similar documents
Bharadia Jaydeep OS with Unix MCQ

UNIX Operating System

OSA _Unit 2. Question Option A Option B Option C Option D. operating system with basic services

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Appendix B WORKSHOP. SYS-ED/ Computer Education Techniques, Inc.

UNIX ASSIGNMENT 1 TYBCA (Sem:V)

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

Introduction to the UNIX command line

Chapter-3. Introduction to Unix: Fundamental Commands

LOG ON TO LINUX AND LOG OFF

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

Linux Shell Script. J. K. Mandal

for more :-

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Software I: Utilities and Internals. What is UNIX?

2) clear :- It clears the terminal screen. Syntax :- clear

UNIX Quick Reference

-1- csh cd. cd alias!! ; set prompt=" pwd % " 16 cd. 17 cd.. 18 his /home% set prompt. alias. yasuoka : root :

SECTION -C. Getting Started with UNIX

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Computer Systems and Architecture

Perl and R Scripting for Biologists

Introduction to Linux Environment. Yun-Wen Chen

IMPORTANT: Logging Off LOGGING IN

A Brief Introduction to Unix

Unix Handouts. Shantanu N Kulkarni

1. What command is used to count the total number of lines, words, and characters contained in a file? A. countw B. wcount C. wc D.

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT

Getting your department account

The Unix Shell & Shell Scripts

Unix Introduction to UNIX

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Unix Basics. Systems Programming Concepts

UNIX Commands. Ex: $ pwd $/tmp $cd/home/sales, this will change the directory from /tmp to /home/sales.

Week 2 Lecture 3. Unix

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Introduction to Linux Workshop 1

Chapter 1. Getting started with UNIX

Common UNIX Utilities Alphabetical List

Introduction: What is Unix?

UNIX. Basic UNIX Command

100 SHELL PROGRAMS IN UNIX

Introduction to Unix: Fundamental Commands

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Common File System Commands

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Computer Systems and Architecture

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Basic Linux Command Line Interface Guide

Useful Unix Commands Cheat Sheet

Basic Linux Command Line Interface Guide

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Introduction to UNIX Command Line

Introduction to Linux

Outline. Structure of a UNIX command

The Unix Shell. Pipes and Filters

LAB 8 (Aug 4/5) Unix Utilities

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Std: XI CHAPTER-3 LINUX

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Part 1: Basic Commands/U3li3es

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Linux & Shell Programming 2014

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

ACS Unix (Winter Term, ) Page 92

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Please choose the best answer. More than one answer might be true, but choose the one that is best.

CS4350 Unix Programming. Outline

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

User Guide Version 2.0

Using the Unix system. UNIX Introduction

List of Linux Commands in an IPm

Introduction to Linux

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Linux Command Line Primer. By: Scott Marshall

UNIX Command Cheat Sheets

genome[phd14]:/home/people/phd14/alignment >

COMS 6100 Class Notes 3

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Files

Introduction to UNIX command-line II

Transcription:

1. Which symbol will be used with grep command to match the pattern pat at the beginning of a line? A) ^pat B) $pat C) pat$ D) pat^ 2. Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r 3. Which command is used to display the top of the file? A) cat B) head C) more D) grep 4. Which command is used to copy all files having the string chap and any two characters after that to the progs directory? A) cp chap?? progs B) cp chap* progs C) cp chap[12] /progs/*.* D) cp chap?? /progs/* 5. Which command is used to change protection mode of files starting with the string emp and Page 1/12

ending with 1,2, or 3? A) chmod u+x emp[1-3] B) chmod 777 emp* C) chmod u+r??? emp D) chmod 222 emp? 6. Which command is used to remove a directory? A) rd B) rmdir C) dldir D) rdir 7. Which of the following keys is used to replace a single character with new text? A) S B) s C) r D) C 8. Which command is used to extract specific columns from the file? A) cat B) cut C) grep D) paste 9. Which command sends the word count of the file infile to the newfile. A) wc infile >newfile B) wc newfile C) wc infile - newfile Page 2/12

D) wc infile newfile 10. Which command is used to remove the read permission of the file 'note' from both the group and others? A) chmod go+r note B) chmod go+rw note C) chmod go-x note D) chmod go-r note 11. Which of the following commands is used to display the directory attributes rather than its contents? A) ls -l -d B) ls -l C) ls -x D) ls -F 12. Which of the following files will displayed by this command cat *ch* A) patch B) catch C).ch D) All of the above 13. The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is: A) 0 B) 755 C) 744 Page 3/12

D) 555 14. If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use A) tty ^c B) stty intr ^c C) stty echoe D) stty echo ^a 15. Which of the following is not a communication command. A) write B) mesg C) mail D) grep 16. Which of the following keys is used to move the cursor to the end of the paragraph. A) } B) { C) D) $ 17. Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? A) cat emp[!0-9] B) more [emp][!0-9] C) cat emp[x-z] D) cat emp[a-z] Page 4/12

18. The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is A) tee B) tr C) sort D) grep 19. Which command is used to remove a file? A) remove B) rm C) mv D) del 20. Which symbol is used to separate more than one command in the same command line? A) $ B) # C) : D) ; 21. The agency that sits between the user and the UNIX system is called the A) logic B) profile C) shell D) erxc 22. Which of the following commands is used to update access and modification times of a Page 5/12

file? A) grep B) wc C) touch D) cat 23. Which command is used to count just the number of characters in a file? A) wc - 1 B) wc -c C) wc -w D) wc -r 24. Which of the following commands is used to list contents of directories? A) ls B) lp C) dir D) tar 25. Which command is used to display a file contents in octal form? A) cd B) od C) of D) oct 26. Which command will be used with vi editor to insert text to left of cursor? A) s B) S C) a Page 6/12

D) i 27. In vi editor, forward search is performed using the command. A) :pat B)?pat C) /pat D) All of the above 28. Which of the following special shell variables is used to process number of the last background job? A) $! B) $# C) $0 D) $* 29. Which option will be used with ps command to slow the entire command line of the process being run? A) -4 B) #NAME? C) -1 D) -2 30. Which of the following command addresses all users who are currently hooked on? A) write B) mail C) wall D) mesg Page 7/12

31. Which option is used with rm command to make the command prompt the user with each filename and a?, before acting on it A) -r B) #NAME? C) #NAME? D) -1 32. Which of the following directories contain all the Alias created by a user, including his login directory? A) /tmp B) /etc C) /usr D) /dev 33. Which of the following commands is used to obtain a list of all files by modification time? A) ls -1 B) ls -t C) ls -i D) ls -R 34. The % key allows you A) to move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace. B) to move the cursor to the upperleft corner of the screen C) to move the cursor backward to the beginning of a word D) to move the cursor to the first column in the current line Page 8/12

35. Which command is used to display the characteristics of a process? A) pid B) du C) ps D) au 36. Which of the following commands is used to identify the type of file by context? A) ls B) cat C) file D) more 37. The field separator in cut command is specified with A) #NAME? B) #NAME? C) -r option D) #NAME? 38. Which of the following options will be used to display number of blocks used by a file? A) -c B) #NAME? C) #NAME? D) #NAME? 39. Which command is used to make all files and sub-directories in the directory (progs) Page 9/12

executable by all users? A) chmod -R a+x progs B) chmod -R 222 progs C) chmod -1 a+x progs D) chmod -x a+x progs 40. Which command is used to display and create files? A) cat B) vi C) ed D) lyrix 41. The second set of the three permissions (r-) indicates that A) group has read permission only B) other has read permission only C) owner has read permission only D) group has write permission only 42. Which column contains all details of the permissions of a file when you issue the ls -l command? A) second B) fourth C) third D) first 43. Which of the following commands is used to display your working directory? A) dir B) prompt $p$g Page 10/12

C) pwd D) path 44. While working with mail command, which command is used to save mail in a separate file? A) s B) r C) w D) d 45. The command used to compare the files is known as A) comp B) cmp C) do D) ccp 46. Which command is used to terminate a process? A) shutdown B) haltsys C) cancel D) kill 47. The cp command uses: A) standard input file B) standard output file C) both input and output file D) neither standard input nor standard output file Page 11/12

48. Which of the following files contains information related to password aging? A) Shadow B) password C) profile D) All the three 49. Which command will be used with vi editor to replace text from cursor to right? A) r B) R C) s D) S 50. Which of the following commands is used to rename a file? A) rename B) remove C) mv D) ren Page 12/12