Introduction to Unix

Calendar 3

Question:

Write a command to display the calendar for December of the year 2015.

Code:

calendar.sh

 cal 12 2015

Calendar 4

Question:

What is the command to display the days of the year 2016 

Example  

Quiz for Exam - Calendar 4

Code:

calendar2.sh

cal -j 2016

Calendar 5

Question:

Write a command to display the previous, current and next month calendar of the year 2015 December.

Code:

calendar3.sh

cal -3 12 2015

Date 2

Question:

What is the format in date command to display the current date as “DATE: 27/11/17.

Code:

date2.sh

date +"DATE: %d/%m/%y" # fill in with correct format to display the current date Example "Date: 27/11/17"

Date 3

Question:

Write a command to display AM or PM in lower case.

Code:

date3.sh

date +%P

Calculator1

Question:

What is the command to perform all the arithmetic operations using basic calculator.

Note: Specify only the command.

Code:

calculator.sh

bc

List of Files 2

Question:

What is the command to list the file or directory names in descending order?

Code:

list2.sh

ls -r

List of Files 3

Question:

What is the command to list the contents of the current directory in comma separated fashion ?

Code:

list3.sh

 ls -m #provide the option to list the contents of the current directories in comma seperated fashion

DiskUsage 1

Question:

What is the command to display the disk usage of the given directory Contest.

Code:

space.sh

du Contest

DiskUsage 3

Question:

What is the command to display the total disk usage of the current directory?

Code:

space3.sh

du -s

Recommended:

  1. All programs of Introduction to Unix
  2. All programs of File System
  3. All Programs of Filters
  4. All Programs of Bourne Shell

Leave a Comment

Your email address will not be published. Required fields are marked *

x