JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV Year SCRIPTING LANGUAGES Previous Question Paper (February/March - 2022 - R18)
Answer Any Five Questions. All Questions carry equal marks.
Main
What does the directory file in UNIX contain? Explain.
Answer
In UNIX, a directory file is a specialized file that acts as a container for other files and directories. Unlike regular files that contain data, a directory file contains a list of mappings that associate filenames with their corresponding inode numbers.
The structure of a directory file is essentially a table with two primary columns: the filename and the inode number. When a user accesses a file by name, the system kernel reads the directory file to find the associated inode number, which then provides the metadata and physical location of the file on the disk.
Key characteristics include:
- It maintains the hierarchical structure of the file system.
- Every directory contains at least two entries: . (representing the current directory) and .. (representing the parent directory).
- Only the kernel can directly modify the contents of a directory file, while users interact with it through system calls like mkdir or rmdir.
Explore the following commands with examples: i) mkdir ii) rmdir iii) chdir iv) getcwd
Answer
The following commands are essential for directory management in UNIX environments:
- mkdir: Used to create a new directory.
Example:
This creates a directory named 'project_files' in the current location.mkdir project_files - rmdir: Used to remove an empty directory. It will fail if the directory contains any files.
Example:rmdir temp_folder - chdir (cd): Used to change the current working directory to a specified path.
Example:
This moves the user into the 'documents' folder.cd /home/user/documents - getcwd: This is typically a system call or a function used in programming (like Python or C) to retrieve the absolute path of the current working directory.
Example (Python):
This prints the full path of the directory where the script is currently executing.import os print(os.getcwd())
Explain the role of Kernel and its functions in Linux.
Answer
Sign in to view the complete answer paper.
Explain zipping and unzipping commands.
Answer
Sign in to view the complete answer paper.
Explain the working of DHCP in Linux.
Answer
Sign in to view the complete answer paper.
How does a Network File System differ from an FTP? Explain.
Answer
Sign in to view the complete answer paper.
Briefly explain the following Networking tools: i) ping ii) finger iii) netstat iv) tracepath
Answer
Sign in to view the complete answer paper.
Explain the working of a NFS and its functions.
Answer
Sign in to view the complete answer paper.
How do you activate Perl debugger? What does it do?
Answer
Sign in to view the complete answer paper.
List and explain any six Perl debugger commands.
Answer
Sign in to view the complete answer paper.
Give the rules of Regular expression matching of Perl.
Answer
Sign in to view the complete answer paper.
Write Perl statements using regular expressions for the following: i) Matches the date format dd-mm-yyyy ii) Count the number of times the word “the” occurs in the given text iii) Substitute lower case with upper case
Answer
Sign in to view the complete answer paper.
Discuss in detail about the variables and data structures in TCL.
Answer
Sign in to view the complete answer paper.
Write a Tk program to demonstrate Keyboard events?
Answer
Sign in to view the complete answer paper.
Describe the different types of Exceptions in Python.
Answer
Sign in to view the complete answer paper.
Write a small code to illustrate try and except statements in Python?
Answer
Sign in to view the complete answer paper.