top of page
book of spells.webp

Start your journey towards mastering the CLI with our FREE Command Line Book of Spells.

By entering your email address you agree to receive emails from Command Line Wizardry. We'll respect your privacy and you can unsubscribe at any time.

  • Writer's pictureCybersecurity Ops with bash

Cybersecurity Ops with bash - Chapter 1 Solutions

Updated: Mar 24, 2019

Below are selected solutions for the Chapter 1 workshop questions from Cybersecurity Ops with bash.

Question 1

Write a command that executes ifconfig and redirects standard output to a file named ipaddress.txt.


To redirect stdout use the > character.


Question 3

Write a command that copies all of the files in the directory /etc/a to the directory /etc/b and redirects standard error to the file copyerror.log.


To copy a file use the cp command. Standard error can be redirected using file descriptor 2.


Question 5

Write a command that executes the script mytask and sends it to the background.


Commands and scripts can be sent to the background using the ampersand (&) character.


Question 6

Given the following job list, write the command that brings the Amazon ping task to the foreground.

[1] Running ping > /dev/null &

[2]- Running ping > /dev/null &

[3]+ Running ping > /dev/null &


Background tasks can be brought to the foreground using the fg command and the corresponding task number.

3,865 views0 comments


bottom of page