Operating Systems
Operating Systems
OPERATING SYSTEMS
Akanshi
PRACTICAL- 2
Aim: Use of basic UNIX Shell Commands/Linux Commands.
Commands:
Practical:
PRACTICAL- 3
Aim: Commands related to inode, I/O redirection and piping, process control commands, mails.
Commands:
1. Inode: Commands like stat and ls -i help explore inode information (unique identifiers for
files).
o stat – Displays detailed information about a file, including its inode number.
Syntax: stat file_name
o ls -i – Lists files with their inode numbers.
Syntax: ls -i
2. I/O Redirection: Commands like echo, >, and >> demonstrate how data can be redirected to
files for both input and output
o echo – Prints a message or the value of a variable to the terminal, or redirects the output to
a file.
Syntax: echo "message"
o > – Redirects output to a file, overwriting the file's current content.
Syntax: command > file_name
o >> – Appends output to the end of a file without overwriting it.
Syntax: command >> file_name
3. Piping: The cat | grep and ls | grep commands demonstrate how data can be passed
between commands using a pipe (|).
4. Process Control: Commands like sleep, jobs, and kill showcase how background processes
are managed and terminated.
Concepts related to sending and receiving emails on Unix/Linux systems typically involve
commands like mail or sendmail. These commands allow users to send messages or outputs
as emails directly from the terminal.
PRACTICAL:
Input:
Output: