0% found this document useful (0 votes)
22 views2 pages

Assignment 2 2025

The document outlines the requirements for Assignment 2 for the FCS (TCS-495) course, with a submission date of April 17, 2025. It includes various tasks related to Linux commands, file permissions, Bash scripting, and Python programming. Additionally, it provides guidelines for formatting and submitting the assignment.

Uploaded by

sumoshravan35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Assignment 2 2025

The document outlines the requirements for Assignment 2 for the FCS (TCS-495) course, with a submission date of April 17, 2025. It includes various tasks related to Linux commands, file permissions, Bash scripting, and Python programming. Additionally, it provides guidelines for formatting and submitting the assignment.

Uploaded by

sumoshravan35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 2 (SUBMISSION DATE: 17th April 2025)

FCS (TCS-495)
1. List five commonly used Linux commands for navigating the file system. [CO2]

2. Explain the purpose of the man command and provide an example of how you would use it
to find information about the ls command. [CO2]

3. Write the Linux command(s) to:


 Create a new directory named "reports".
 Create an empty file named "data.txt" inside the "reports" directory.
 Copy the "data.txt" file to your home directory.
 Move the copied "data.txt" file to a new directory named "archive" in your home
directory.
 Remove the "reports" directory (including its contents). [CO2]

4. Compare and contrast the functionality of the cp and mv commands in Linux. [CO2]

5. You need to add the text "Important information" to the beginning of an existing file named
"notes.txt". Evaluate two different Linux commands that could achieve this. [CO2]

6. Design a series of Linux commands to create a new user named "tester" with the password
"secure123", add this user to the "sudo" group, and then switch to the "tester" user. [CO2]

7. What are the three main categories of file permissions in Linux? What are the read, write,
and execute permissions represented by? [CO2]

8. Explain how the numerical representation of file permissions (e.g., 755) relates to the
symbolic representation (e.g., rwxr-xr-x). Provide an example. [CO2]

9. Write the Linux command to change the permissions of a file named "script.sh" so that the
owner has read, write, and execute permissions, the group has read and execute permissions,
and others have only read permission. [CO2]

10. What is the primary purpose of the grep command in Linux? Provide a basic example of its
usage. [CO2]

11. Describe the typical process of starting and stopping a system service in Linux. Provide an
example using a common service like ssh. [CO2]
12. Design a cron job that runs a script named "backup.sh" every day at 3:00 AM. Write the
corresponding entry in the crontab file. [CO2]

13. Write a Bash script that takes a filename as a command-line argument and checks if the file
exists. If it exists, it should print "File exists"; otherwise, it should print "File does not exist".
[CO2]

14. Write a Bash script that reads a list of filenames from a file named "files.txt" (one filename
per line) and creates a new directory named "processed" and moves each file from "files.txt"
into the "processed" directory. [CO2]

15. Explain the difference between a Python list and a tuple. When might you choose to use one
over the other? [CO2]

16. Write a Python function called calculate_average that takes a list of numbers as input and
returns their average. Then, demonstrate how to use this function with a sample list. [CO2]

17. You have a collection of student names and their corresponding scores stored in a Python
dictionary. Evaluate different ways to iterate through this dictionary and print each student's
name and score. Which method do you think is most readable and efficient for this task?
Explain your reasoning. [CO2]

Guidelines:

1. Use clean and high-quality A4 sheets for your assignment.

2. Include the date of submission on the first page.

4. You need to include your Name, Class, Section, and Roll no., on the every page of your
handwritten assignment.

You might also like