Unit - 1 Course File Questions and Answers and Model Papers Question and Answers
Unit - 1 Course File Questions and Answers and Model Papers Question and Answers
1. Define Computer?
A computer is an electronic device that can be programmed to accept the data in the form of input and
generates the data in the form of output. A computer can also store the information in the memory.
3. The computer language that most closely resembles machine language is Assembly language.
An executable file is a type of computer file that contains a program capable of being run or executed
by a computer.
7. What is an Operating System (OS) and list out various Operating Systems?
Operating System:
The operating system (OS) is a special category of system software that manages all the components of
a computer.
OS is an interface between user and computer.
Ex: Windows, Android, MacOS etc.
list out various Operating Systems:
The functions of operating system is of 8-types:
1. Security
2. Networking
3. Error Detection
4. Memory Management
5. Process Management
6. Device Management
7. File Management
8. Job Accounting
8. unit – 2
9. unit-2
10. Which command is used to move all files to the bien sub-directory of the parent directory?
$ mv * ../bin/
../bin/: The path to the bin sub-directory located in the parent directory (the .. refers to the parent directory).
11. Which command is used to change protection mode of files starting with the string emp andending
with 1, 2, or 37 ?
Where, chmod <permissions>: Replace <permissions> with the desired permission settings.
emp{1,2,37}: This uses brace expansion to match files that start with emp and end with either 1, 2, or 37.
12. Which command is used to remove the read permission of the file 'note' from both the group & others
?
13. Which key is used to move the cursor to the end of the paragraph?
To move the cursor to the end of the paragraph, you can usually press the End key.
14. What is the vi command to change Case for 4 characters form the current position?
$ ~4
Where, ~: This command toggles the case of the character under the cursor.
4: This specifies that you want to apply the command to the next 4 characters.
15. What is the command to mail a letter to 5 users?
$ mail [email protected] [email protected] [email protected] [email protected]
[email protected]
- After typing the command above, press Enter.
- You'll be prompted to enter the subject of the email. Type your subject and press Enter.
- Then, write your message. After you finish, press Ctrl + D to send the email.
Essay Type Questions
1. Write down the salient features of UNIX?
1. Portable
2. Multi – user
3. Multi - tasking
4. Networking
5. Organized file system
6. Device independence
7. Utilities
8. Services
1. Portable
2. Multi –User
3. Multi Tasking :
4. Networking
Unix stores all the files in a proper order to find the files easily.
In Unix ---- Root Directory ---- Home Directory ---- pwd ----- Files
6. Device Independence
The Unix treats the input and output devices like a ordinary files is known as regular file.
The source of input and output files can be easily controlled by a Unix feature is known as redirection.
Ex : cat > student_details.txt
7. Utilities
There are tools like text editors that helps us to do the tasks easily.
It has some small specialized commands that performs a specific task.
8. Services
Services is a background process that runs continuously without any interaction from the user.
The services are typically responsible for network connectivity, logging, scheduling tasks.
1. Hardware
The Hardware layer of the Unix Operating System controls the use of physical system resources. such
as, memory and process managment, C,D driver etc.
Hardware consists of peripheral devices are RAM, HDD, CPU etc.
2. Kernel :
3. shell
The Interpreter reads the user commands and works with the kernel to execute them .
A Shell Script is a file that contains collection of shell commands that perform a specific task.
4. Utilities
Utilities means the tools like a text editors that helps us to perform the tasks easily.
It has some small specialized commands that performs a specific task. Ex: gedit, ls, cat, cp, rm, mv etc.
5. Applications / Application Programs :
Application programs can be written by the system administrators and users. Such as MS word , spread
sheet (Excel) , powerpont presentations (PPT)
Multiuser Support
1. Multiple Accounts: Many users can have their own accounts on the same system, each with a unique
username and password.
2. Permissions: Unix controls who can access files and directories through a permission system, ensuring
that users can only access their own data or what they are allowed to see.
Multitasking Support
1. Running Multiple Programs: Unix can run many programs at the same time. It handles this by sharing
CPU time among processes.
2. Creating New Processes: Users can start new programs easily, and Unix manages these programs
through command script.
3. Background and Foreground Tasks: Users can run tasks in the background (using &) while still using
the terminal for other commands, allowing them to multitask effectively.
4. Communication Between Programs: Unix has ways for programs to talk to each other, making it
easier to work with multiple tasks at once.
The man command is an essential tool for Unix/Linux users, providing comprehensive documentation
for commands and utilities. Understanding its structure and how to navigate it is crucial for effective
command-line usage.
[command]: The name of the command or utility for which you want to see the manual.
The mount and umount commands in Unix/Linux are essential for managing file systems and storage devices.
The mount command is used to attach a file system (from a disk, USB drive, or network share) to a specific
directory in the existing file system hierarchy.
Without mounting, the operating system does not recognize or access the contents of storage devices.
The umount command is critical for safely disconnecting a mounted file system.
Using umount helps prevent data corruption. If a file system is unmounted improperly (e.g., by simply
unplugging a USB drive),
7. Unit -2
8. Unit-2
9. Discuss working of following commands with suitable examlpes :-
a) cal b) date
c) uname d) printf (echo)
a) cal
Usage:
Example:
$ cal
b) date
The date command displays the current date and time. You can also format the output to show specific
information.
Usage:
Example:
$ date
Output:
Output:
2023-10-20 14:32:50
c) uname
The uname command prints system information such as the operating system name, kernel version, and
hardware architecture.
Usage:
Example:
$ uname
Output:
Linux
Example:
$ uname -a
Output:
Linux hostname 5.4.0-42-generic #46-Ubuntu SMP Thu Oct 15 00:00:00 UTC 2023 x86_64 x86_64
x86_64 GNU/Linux
Both printf and echo are used to output text to the terminal. printf offers more formatting options than echo.
Usage of echo:
Example:
Output:
Hello, World!
Usage of printf:
Example:
Output:
Short
Input Devices:
Output Devices:
4. What is the only octal value for the read permission while manipulating file permission?
The only octal value for the read permission in file permissions is 4. In the context of file permission
settings, the values are as follows:
Read (r) = 4
Write (w) = 2
Execute (x) = 1
The command used to know the present working directory in a Unix/Linux environment is $ pwd.
1. Bourne Shell(sh)
2. Bash
3. C Shell (csh)
4. Korn Shell (ksh)
5. tcsh
7. Differentiate between computer hardware and software?
1. Sketch the basic parts of a computer and describe the functions of operating system?
1. Security
Significance: Protects data and resources from unauthorized access, ensuring system integrity and user
privacy.
2. Networking
Significance: Facilitates communication between computers and devices, enabling resource sharing and
remote access.
3. Error Detection
1. System Stability
2. Data Integrity
4. Memory Management
Significance: Optimizes the use of physical memory, ensures data integrity, and prevents memory leaks,
allowing programs to run efficiently.
5. Process Management
Significance: Ensures efficient CPU utilization and enables multitasking, allowing multiple applications
to run simultaneously without interference.
6. Device Management
Significance: Ensures smooth communication between the system and peripheral devices (like printers,
keyboards, etc.), enabling proper functioning of all hardware components.
7. File Management
Significance: Provides a structured way to store data, ensuring data security and accessibility while
managing disk space effectively.
8. Job Accounting