Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 : Input Redirection 1 . Use the cat command to display the contents of a text file named input.txt . 2 . Redirect

Task 1: Input Redirection
1. Use the cat command to display the contents of a text file named input.txt.
2. Redirect the contents of input.txt to a new file named output.txt using input
redirection.
Task 2: Output Redirection
1. Create a simple shell script named list_files.sh that lists the files in the
current directory using the ls command.
2. Execute the list_files.sh script and redirect its output to a file named
file_list.txt using output redirection.
Task 3: Arrow Redirection
1. Use the echo command to print "Hello, World!" to the terminal.
2. Redirect the output of echo to append "Welcome to Unix/Linux!" to a file
named welcome.txt using arrow redirection.
Task 4: Process Management with ps
1. Use the ps command without any options to display information about
processes running in the current terminal session.
2. Use the ps -ef command to display information about all processes running
on the system.
3. Use the ps aux command to display detailed information about all processes
running on the system.
4. Filter the output of ps aux to display information only about processes owned
by a specific user (e.g., your username).
5. Filter the output of ps aux to display information only about processes related
to a specific command (e.g., sshd).
6. Redirect the output of ps aux to a file named process_info.txt for future
reference.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions