Tuesday, January 18, 2022

Unix For VLSI Industry - Part 2a - Assignment 1


Unix and VLSI And Our Education System (or say the skills in Freshers) are at 3 different levels right now, even though people know that without Unix it's impossible to even work in VLSI industry. Unfortunatly, It's been so many years but it's not in curriculum of any engineering college. Same thing I have highlighted in my previous article.

In the previous part, we have discussed few commands and I have asked all of you to do the practice using the Google :) because a lot of content is already available. But still I have received a lot of request for practice questions. I am capturing practice questions or exercise (which is going to be very usefull for all of you) in the form of articles and giving it a title of assignments. Do the Practice and I am sure it will help you a lot.

Relative Path and Absolute Path Concepts

I have seen a lot of people strugling with this. Let's do some practice on these concepts.
  1. Exercise:
    • Create two directories LINUX, SHELL
    • Go to directory LINUX and create a file SCRIPT
    • Go to directory SHELL and create a file INTERPRETER
    • Use relative path to copy file SCRIPT from directory LINUX when you are in directory SHELL
    • Use absolute path to go to directory LINUX
    • Use relative path to copy file INTERPRETER from directory SHELL when you are in directory LINUX
  2. Write the UNIX command to copy a text file from one directory to another directory using the relative path to the source and absolute path to the destination.
  3. Write the UNIX command to copy a directory using an absolute path that may contain other files or directory.

Direcory and File Structure

  1. Exercise:
    • Create the tree as shown on the left, Directories are white, and files are black
    • Swap files i311 and i321
    • Move file h411 to g32 while pwd is f3
    • Copy file h412 to h32 while pwd is g41
  2. Write the UNIX command to list a tree of directories and files in the PWD.
  3. Write the UNIX command to identify the directories and files in PWD.
  4. Write the UNIX command to display UID and GID of files in PWD.
  5. Write the UNIX command to remove all directories and files from PWD.

File and Directory Permission

  1. Write a UNIX command to provide the permission to directory only for other users for listing its content. Rest of permissions should be disabled. Use only symbolic mode.
  2. Write a UNIX command to provide the permission to directory only for group users entering into it. Rest of permissions should be disabled. Use only symbolic mode.
  3. Write a UNIX command to provide the permission to directory only for creating directories and files into it. Rest of permissions should be disabled. Use only symbolic mode.

Search Operation

  1. Write the UNIX command to search the files containing the particular string in it using throughout the file system.
  2. Write a UNIX command to find out the specified file in the given path.
  3. Write a UNIX command to find out the specified directory in the given path.
  4. Write a single UNIX command to find out the specified bash script in the given path and execute it.
  5. Write a single UNIX command to find out the specified bash script in the given path and execute it.

Matching - Patter or String

  1. Write a UNIX command to print the lines that do not match the pattern.
  2. Write a UNIX command to count the number of lines that match the pattern.
  3. Write a UNIX command to display the file name that matches the pattern.
  4. Write a UNIX command to match the line that ends with the given string.

File Operation

  1. Write a UNIX command to count the number of words in a file.
  2. Write a UNIX command to delete the first line and last line from file.txt.
  3. Write a UNIX command to remove blank lines in a specific file by using Sed Command.
  4. Write a UNIX command to print only blank lines using Sed Command.
  5. Write a UNIX command to replace empty lines with ***Blank lines*** keyword.
  6. Write a UNIX command to delete word "negativity" from the file.
  7. Write a UNIX command to print the first and last line of the file using Sed Command.
  8. Write a UNIX command Write a command to display the 7th and 9th line from a specific file.
  9. Write a UNIX command to remove the first 20 lines from a file.
  10. Write a UNIX command to duplicate each line in a file.

This assignment is just for your practice - means you try these commands and then try and try. Only then you will be able to remember these these commands. Apart of 1-2 questions - rest all you are going to to use extensively in the VLSI industry.
.
Stay Tune and Happy Learning. We discuss more in next Assignment.:)

No comments:

Post a Comment