Vous êtes sur la page 1sur 13

UNIX-EV1

Duration: 3 Hours (4:15PM to 7:15PM, 29/July)


Total Marks: 100

Each question should be answered with practical significance from a your job domain perspective
(Ex: a Physical Design engineer should give their perspective on how they will use the command)

1. List down main features of UNIX


2. What is Kernel, significance in UNIX?
3. What is a Shell? Different types of Shells, how they differ?
4. UNIX command format syntax
5. How to get detailed usage description of a UNIX command
6. Describe the usage and functionality of the command “rm –r *” in UNIX?
7. What is the UNIX command to list files/folders in alphabetical order?
8. Write the command to create a link? Give few practical advantages of creating links?
9. What is meant by Super user? How do we login to other user account in terminal?
10. List significance of below commands
a. Chmod
b. Chown
c. Chgrp
11. What is the command to find today’s date?
12. What is the command to delay a command execution by 10mins?
a. Sleep : how this command can be used for practical applications
13. What is difference between following commands
a. More
b. Less
c. Touch
d. head
e. Tail
i. How to display last 10 lines of a file
14. How to do zip and unzip in UNIX?
15. How to change access permission in UNIX?
a. Chmod +x filename
b. Chmod NNN filename
c. How to do recursive permission change for all the files in a directory
16. How to list various process in UNIX? How to kill a process in UNIX?
a. What is the difference between ps, top, bjobs
17. Explain the advantage of executing processes in the background?
18. What is the command to find maximum memory taking process on the server?
19. What is the command to find hidden files in the current directory?
20. What is the command to find the currently running process in Unix Server?
21. What is the command to find remaining disk space in UNIX server?
22. What is the command to find disk space used by various file and directories in current directory?
23. What is the UNIX command to make a new directory?
a. List down various options of a mkdir commands
24. What is the UNIX command to confirm a remote host is alive or not?
25. What is the method to see command line history?
a. How to run specific command from history without typing whole command
26. What is the command to find weather system is 32 bit or 64 bit?
27. Show the usage of below commands in UNIX
a. Cat
b. Cd
c. Chgrp
d. Chmod
e. Cp
f. File
g. Find
h. Grep
i. Ln
j. Ls
k. Mkdir
l. Mv
m. Pwd
n. Rm
o. Rmdir
p. Tail
q. Touch
28. What is concept of piping in UNIX? Write practical significance of piping?
a. Ex: Ls -ltr | grep axi
29. What is the command to count the number of characters and line in a file?
30. Write the significance of * & ? in unix command?
31. List down various UNIX environment variables? Write the significance?
a. Ex: $PATH, $LM_LICENSE_FILE, $SHELL,
32. What is tkdiff, diff
33. What is significance of sort -u command? Why is it important for text file manipulation
34. Write the significance of alias command in UNIX? Practical significance?
35. What is tee command in UNIX

UNIX TRAINING

• Units

• Notifications

• Discussions

• Grades

• Course Details

UNIX Concepts:

Understanding must correlate with similar

feature in Windows

Windows requires 80% mouse usage, 20% keyboard

Unix requires 20% mouse usage, 80% keyboard


Unix works in 3 shells : BASH, CSH, TSHELL

All of these have RC files (.bashrc, .cshrc, .tcshrc)

These RC files are the configuration files which

decide how Linux terminal will behave like

Contents of RC file

Unix is divided in to multiple folders (decided

by admin)

/usr/bin

/usr/tools

/usr/proj

PATH variable

Updating PATH variable in all 3 shells

Setenv

alias


Working with text editors in Unix

Unix provides multiple text editor

Gvim

/usr/Sreenivas/.vimrc is the root configuration file on how VIM

will behave

Nedit

Emacs

Listing files

Searching files

Moving files

Searching for pattern

From command line

From text editor (mapping text editor to

multiple folders)

Revision Management
o

CSV, Clearcase

Creating a work environment

Unix terminal commands

Alias

Date

Sleep

Listing file

Remove

Mkdir

Pwd

Cd

Changing file permissions

Su

o
Password

Xhost

xterm

Pushd, popd

Gvim

History

Grep

Find

–r , -i, *, -d, -s

Sending mail

Gunzip

Piping log file

Makefile

GVIM Commands
o

Open file

Split

Changing color scheme

Changing font

Copying, pasting, deleting lines, word, char

Adding line

Questions:

Login to Putty, setup

VNC viewer, try below in VNC.

1.

Write a command to create a file top.sv

a.

Code top.sv as a AXI VIP top module

2.

Search for axi_intf in AXI VIP top module

3.

Write a command to list all the files inside a

folder recursively
a.

ls -R

4.

Search all the files which contains

a particular string, say “include” within a folder.

a.

for i in *.*; do grep -l

include $i; done

5.

Rename all the files within a folder with suffix “Unix_” i.e.

suppose a folder has two files a.txt and b.pdf than they both should be renamed

from a single command to Unix_a.txt and Unix_b.pdf

a.

for i in *.*; do mv $i

Unix_$i; done ;

6.

Rename all files within a folder with the first word of their

content(remember all the files should be text files. For example if a.txt

contains “Unix is an OS” in its first line then a.txt should be renamed to

Unix.txt

a. for i

in *.txt; do j= "$(head -1 $i | cut -f1-d" ").txt"; mv

"$i" "$j"; done

7.

Suppose you have a C project in a folder called “project”, it

contains .c and .h files, it also contains some other .txt files and .pdf files.

Write a Linux command that will count the number of lines of your text files.
That means total line count of every file. (remember you have to count the

lines in .txt files only)

a. wc

–l *.txt

8.

Rename all files which contain the sub-string 'foo', replacing

it with 'bar' within a given folder.

a.

for i in ./*foo*; do mv "$i"

"${i//foo/bar}";done

9.

Show the most commonly used commands from “history”.

a.

history |cut -f6- -d" " | sort

10.

Changing directory

a.

Create a directory structure

b.

Try example to change different directories using cd, cd ..,

pushd

c.

Copy one directory contents to another

d.

Copy one directory to another

11.

Permissions of file
a.

Check permissions

b.

Change permissions

12.

Space occupied in disk

a.

Du –sh *

b.

Df –k .

13.

Print current time

a.

date +%T

14.

Command for printing the year, month, and date with a horizontal

tab between the fields?

a.

date +%Y%t%B%t%e

15.

Type contents of file

a.

Filename, press enter

b.

Ctrl + D

16.

With reference to question 7, What is the command for listing


all files ending in small letters?

a.

find . –name “*[a-z]”

17.

sed

18.

Find out about the sleep command and start five jobs in the

background, each one sleeping for 10 minutes.

a.

sleep 600 & sleep 600 & sleep 600 & sleep 600 &

sleep 600 &

19.

Get status of all jobs running

a.

ps

UNIX TRAINING

• Units

• Notifications

• Discussions

• Grades

• Course Details
Unix

Assignment Questions

01. What is an operating system?

02. What are the various components of a

computer system?

03. What is purpose of different operating

systems?

04. What are the different operating systems?

05. What is BIOS?

06. Write command to list all the files and directory

in your home directory?

07. What commands are used to create a

read-only file in your home directory?

08. How will you find which operating system

your system is running on in UNIX?

09. How do you know if a remote host is alive

or not?

10. How do you see command line history in

UNIX?

11. How do you copy file from one host to

other?

12. How do you check how much space you have

on all the file systems?

13. What is the difference between Swapping

and Paging?
14. What is difference between Hard Link and

Soft Link in UNIX?

15. What is "chmod" command? What do

you understand by the line “r-- -w- --x?

16. In a file word UNIX is appearing many

times? How will you count number?

17. How do you find whether your system is 32

bit or 64 bit?

18. How do you find which processes are using

a particular file?

19. You have a tab separated file which contains Name, Address and PhoneNumber,

list down all Phone Number without their name and Addresses?

20. Your home directory is full? How will you find which

directory is taking how much space?

21. Shell

scripting in UNIX

22. Copying

file from one host to another

Scp

ftp

23. Which

process taking how much CPU

24. How to

kill a process, running a process in background

Vous aimerez peut-être aussi