Linux Foundations / Final Challenge

Complete a small Linux workspace challenge

Lesson 37 of 37. Open to read. No account needed.

A useful handoff contains more than files with plausible names. Someone must be able to identify the input, explain the report, distinguish a successful run from a failed one, and recover the same work from its archive.

This challenge combines a bounded set of skills you have already practised: organizing paths, preserving a spaced filename, diagnosing one owned script's execution access, checking a defensive report, and restoring a known archive. The whole delivery task is independent. Starter material and acceptance criteria come first; four graduated hints and an explained solution follow.

Starting state and boundaries

Complete Build and verify the report script and settle its cleanup. The script-invocation and archive lessons are also part of the preceding learning path. This challenge supplies every file again; it does not depend on retaining an earlier practice directory.

Goal: deliver an organized, checked workshop handoff and demonstrate that the same input, script and report can be restored beneath a new directory.

Starting state: use the normal nonzero-UID account in the declared full Ubuntu 24.04 amd64 guest, with Bash 5.2, the course's GNU utilities, nano 7.2, tar 1.35 and gzip 1.12. Use the already established ordinary file-permission and script-execution environment. No host terminal or administrator action is part of this challenge.

Effects: create only the named directories, synthetic files, captures and archive inside ~/linux-practice/linux-workspace-challenge/. Change only the supplied script's owner execute bit, then restore its recorded original mode. Keep the original input until every comparison is complete. There are no account, package, service, listener, network or startup changes.

Your observations and written explanations are self-checks. Reading this solution or marking a lesson complete is not automatic grading, independent skill verification or proof of every administrative ability in the course.

Re-establish the taught baseline

Run one line at a time. Read each result and stop after an unexpected setup, file or command-origin error. Inspect the familiar origins before use:

type cd pwd printf set declare type id ps mkdir ls cat wc nano stat chmod cp mv cut env sort tar gzip rm rmdir exit '[' bash
type -a ls
type -P ls
type -P bash

Require the expected Bash builtins and distribution executables. In particular, printf must be the builtin; cut, env and sort must not be custom functions inherited by a child. Preserve only the understood color-only ls alias, with no hidden function or unexplained origin. Use the selected distribution /bin/bash, including the normal guest /bin layout, rather than substituting another interpreter.

id -u
id -un
ps -p $ -o comm=
ps -p 1 -o comm=
set -o
ls -ld -- /bin/bash

Require your recorded ordinary identity, Bash and systemd PID 1. Keep parent errexit, allexport, nounset, posix and pipefail off, as in the script lessons. Preserve a different setup and reconcile it instead of changing these options. The following named inspections have the same meanings as before:

declare -p BASH_ENV
declare -p SHELLOPTS BASHOPTS
declare -p TAR_OPTIONS
declare -p GZIP
declare -p LC_ALL LC_COLLATE LANG

Require BASH_ENV, TAR_OPTIONS and GZIP individually undeclared. A declared empty value is still outside this simple baseline; do not unset a collision. Unexported locals are not automatically inherited, but this course guard deliberately requires no declaration. --noprofile/--norc do not suppress BASH_ENV. Require the existing SHELLOPTS/BASHOPTS readonly declarations without export attribute x. Record the named locale declarations or absence results for later comparison; do not execute the printed declarations.

The report sets pipefail only in its child Bash and gives only sort a command-scoped C locale. No new parent variable is required for this task.

Supply the fresh inbox

Inspect the known home/shared parent and the prospective task entry without trailing slashes:

ls -ld ~
ls -ld ~/linux-practice
ls -ld ~/linux-practice/linux-workspace-challenge

Require recognized ordinary directories owned by your account and the task name absent. An existing attempt belongs to the resume section. After that acceptance:

mkdir ~/linux-practice/linux-workspace-challenge
ls -ld ~/linux-practice/linux-workspace-challenge

Accept the new ordinary owned directory, then enter and verify separately:

cd ~/linux-practice/linux-workspace-challenge
pwd
ls -a

Require the exact recorded task path and only dot entries before:

mkdir inbox
ls -ld -- inbox
ls -a -- inbox

Require the known ordinary owned empty directory. After confirming the spaced input name absent, create the complete synthetic dataset:

printf '%s\n' 'D01,ready,Mira' 'D02,hold,Asha' 'D03,ready,Dev' 'D04,open,Asha' 'D05,hold,Mira' 'D06,ready,Bo' > 'inbox/workshop records.txt'
ls -ld -- 'inbox/workshop records.txt'
cat 'inbox/workshop records.txt'
wc -l -- 'inbox/workshop records.txt'

Require an ordinary owned single-link file with exactly these six lines and six newline characters:

D01,ready,Mira
D02,hold,Asha
D03,ready,Dev
D04,open,Asha
D05,hold,Mira
D06,ready,Bo

The familiar record contract is header-free ID,status,owner: exactly three nonempty fields and two commas per record, with no blank record, extra field, embedded comma, CSV quoting or multiline field. Each record ends in a newline. The report also permits a genuinely zero-byte dataset, but this challenge uses the supplied six records. File predicates do not validate this format; inspect it separately rather than assuming any readable file is suitable.

Save the complete supplied script

Inspect the inbox inventory and require owner-report.sh absent:

ls -a -- inbox

Only after that check:

nano inbox/owner-report.sh

Enter the complete file below, with a final newline. Use the taught Ctrl+O, confirm the exact filename, then Ctrl+X. Markdown fences are not file content.

#!/bin/bash
set -o pipefail
if [ "$#" -ne 1 ]; then
    printf '%s\n' 'Usage: owner-report.sh INPUT' >&2
    exit 2
fi
if [ ! -f "$1" ]; then
    printf '%s\n' 'Input must be a regular file.' >&2
    exit 3
fi
if [ ! -r "$1" ]; then
    printf '%s\n' 'Input must be readable.' >&2
    exit 3
fi
if cut -d ',' -f 3 -- "$1" | env LC_ALL=C sort; then
    exit 0
else
    printf '%s\n' 'Could not produce owner report.' >&2
    exit 4
fi

Before moving or executing it, inspect the saved content and actual metadata:

ls -ld -- inbox/owner-report.sh
stat -c 'mode=%a uid=%u gid=%g links=%h file=%n' -- inbox/owner-report.sh
cat inbox/owner-report.sh
wc -l -- inbox/owner-report.sh

Record the actual full original mode, numeric UID/GID and link count in your written answer. Require one ordinary file owned by your account, one hard link, owner read/write, no execute bits, no special bits and no additional ACL or unexplained mode marker. Require exactly the supplied 20 lines and 20 newlines. Do not assume the original mode is 644 or change an unexpected file to force this starting state.

The absent owner execute bit is the supplied bounded defect for the requested direct invocation. Its metadata is evidence; a later permission diagnostic alone will not identify every possible cause of execution failure. The script itself is complete and should remain unchanged throughout.

Recall what the actual script protects

The shebang names /bin/bash for direct execution. The count check precedes $1; the quoted expansion supplies one input path. The -f and -r predicates follow symlinks and describe current file/readability conditions. They do not prove ownership, record format or a future read free of races. The separate owned-file and content checks remain necessary here.

Field 3 is the owner. The conditional cut/sort pipeline keeps duplicates and uses C-locale order only for the child sort. Script-local pipefail makes an upstream processing failure visible; success includes the final output write. Chosen statuses 2, 3 and 4 mean argument, path/read and processing rejection for this script. A nonzero run can leave partial stdout, which is not an accepted report. These are all previously taught constructs, not a new parser or toolchain.

Independent challenge: deliver the checked handoff

Work from the checked outer task directory. Use only taught tools and inspect each new destination before writing. The starter above is supplied setup; the following delivery sequence is yours to plan before opening the hints.

The retained inbox input is compared with an organized handoff containing data, the supplied script and its checked owner report. Three specified relative regular-file members form a separate archive. A new restore destination and report rerun provide additional comparison evidence before cleanup.

The green arrows connect required deliverables and their checks; the blue branch retains the unchanged inbox input and checked handoff as comparison references. This is the target evidence relationship, not a command recipe or evidence that your work has run. The diagram does not give the permission-repair command or report answers.

Requested inventory and outcomes

DeliverableRequired location and content
Retained originalinbox/workshop records.txt, unchanged six records.
Working inputhandoff/data/workshop records.txt, an exact copy.
Maintained scripthandoff/bin/owner-report.sh, moved from inbox, same 20 lines, with only the needed owner execution access added.
Owner reporthandoff/reports/owners.txt, six C-sorted owner occurrences, including duplicates.
Archiveworkspace-handoff.tar.gz at the outer task root, outside handoff.
Fresh restorationrestored/data/workshop records.txt, restored/bin/owner-report.sh, restored/reports/owners.txt; no handoff prefix inside restored.

The exact required report is supplied as acceptance data:

Asha
Asha
Bo
Dev
Mira
Mira

Each line ends in a newline. Explain the source row for every occurrence, including both Ashas and both Miras. Six wrong values or four unique owners do not satisfy the request merely because the output looks organized.

The archive manifest contains exactly these three relative regular-file members, each once:

data/workshop records.txt
bin/owner-report.sh
reports/owners.txt

Do not include inbox, error captures, the archive itself, extra directory members, absolute paths, parent components or links. The nested file names require data/bin/reports directories under a fresh restore root; extraction creates those needed parents. It does not add a handoff prefix to the names.

Required actual observations

  1. Organize the input and script while retaining the original data. Record the script's original mode before its move; verify the same contents, owner/group and mode afterward. Preserve any unexpected collision.
  2. Attempt the requested direct script path before the repair. Keep its actual status and diagnostic in before-repair.out/before-repair.err. Diagnose from the path, identity, saved shebang and recorded access; do not infer a universal cause from the diagnostic alone.
  3. Apply only the supported owner-execute repair. Run the direct script on the spaced working input. Save stdout at the requested report path and stderr in valid.err. Require status 0, exact six-line/six-newline report and zero-byte stderr, with original input preserved.
  4. Actually test no argument and a confirmed absent handoff/data/missing.txt. Use distinct no-argument.out/.err and missing.out/.err. Require statuses 2 and 3, empty stdout and the script's appropriate exact diagnostic. Do not create or delete an input to make these tests appear to pass.
  5. Create the archive outside handoff. Check its creation status and owned regular-file identity, gzip integrity, exact member list and member types before extraction. All three entries must be regular files.
  6. Restore beneath new empty restored. Compare complete original/restored input, script and report content and newline counts. Inspect the full restored inventory, not just a familiar filename. Extraction metadata can depend on its rules and creation mask; identical permission modes are not promised.
  7. Run the restored script with explicit /bin/bash --noprofile --norc, using its restored spaced input. Save fresh restored-run.out/.err. Require status 0, the same six owner lines/newlines and zero-byte stderr. Do not change restored permissions merely to imitate the live script.
  8. Explain the evidence, then restore the live script's complete original mode through the inverse of the one known bit change. Recheck the mode, owner/group, link count, original input and parent settings before cleanup.

There are 17 final regular files: the retained original; three handoff files; three restored files; the archive; and nine captures outside handoff (before-repair.out/.err, valid.err, no-argument.out/.err, missing.out/.err, restored-run.out/.err). The moved inbox script is no longer an extra file. Keep all captures distinct from source files and from one another.

Four graduated hints

  1. Inspect before acting. Start with pwd, complete inventories, saved input/script content and the recorded original mode. A destination's name is not proof that it is fresh or belongs to this attempt.
  2. Repair the demonstrated difference. Direct execution differs from asking an already selected Bash to read a file. For the accepted starting mode, only owner execute is missing; retain group/other permissions and record the inverse needed after all work.
  3. Trace the report and its status. Field 3 supplies one owner per record. C-locale sort retains duplicates. Separate stderr and capture the immediate status; a failed output is not valid merely because it contains plausible lines.
  4. Connect archive names to restoration. The member names following the source root determine what appears beneath the new restore root. Integrity, member selection and restored contents answer different questions; complete each check before moving on.

Check Your Understanding

Before the solution, write a short explanation of these decisions:

  1. Why does the quoted input count as one path? Why are quoting, file predicates and manual format checks different protections?
  2. What evidence justifies the narrow access repair, and why would sudo, a broad mode change or a filesystem-policy change be inappropriate?
  3. Why do the correct number of report lines and a successful gzip test still leave separate acceptance questions unanswered?
  4. What does the restored-script run add to text comparison, and which abilities does this bounded challenge leave to earlier course exercises?

Answer and Reasoning

This is one reference sequence after a fresh accepted starter. Equivalent taught sequences are valid when they preserve every scope, status and content check. Do not paste this over a partial attempt; use the resume procedure.

1. Organize without losing the source

Recheck the outer pwd, inbox identity, exact two-file starter, script's recorded metadata and handoff absent. After acceptance:

mkdir handoff
ls -ld -- handoff
ls -a -- handoff

Require an ordinary owned empty directory before:

mkdir handoff/data handoff/bin handoff/reports
ls -ld -- handoff/data handoff/bin handoff/reports
ls -a -- handoff/data handoff/bin handoff/reports

Require three recognized ordinary owned empty directories. The taught cp -iT uses the exact file destination; -i asks about an overwrite and -T prevents directory interpretation. Here the destination must be absent; decline an unexpected overwrite and stop. After checking that absence:

cp -iT -- 'inbox/workshop records.txt' 'handoff/data/workshop records.txt'
ls -ld -- 'handoff/data/workshop records.txt'
cat 'inbox/workshop records.txt'
cat 'handoff/data/workshop records.txt'

Require the new owned single-link file and all six exact records in each. Recheck bin empty and the script still the recorded inbox file before:

mv -i -- inbox/owner-report.sh handoff/bin/owner-report.sh
ls -a -- inbox handoff/bin
ls -ld -- handoff/bin/owner-report.sh
stat -c 'mode=%a uid=%u gid=%g links=%h file=%n' -- handoff/bin/owner-report.sh
cat handoff/bin/owner-report.sh

Require the script absent from inbox, present at the intended exact path, with unchanged full original mode, owner/group, one link and all 20 lines. The input remains in inbox because it was copied; the script was moved. An unexpected mv prompt, refusal or error stops the transition.

2. Observe the defect, then make the narrow repair

Require before-repair.out/.err absent, the exact known task cwd and all traversed directories ordinary, owned and searchable. Recheck the complete script, its shebang and original owner-x absence, then:

./handoff/bin/owner-report.sh 'handoff/data/workshop records.txt' > before-repair.out 2> before-repair.err
printf 'before-repair exit: %s\n' "$?"

Record the actual nonzero result and inspect both owned captures:

ls -ld -- before-repair.out before-repair.err
cat before-repair.out
cat before-repair.err

For the accepted defect, expect empty stdout and an execution-permission diagnostic. Keep its actual wording. This is not successful empty input: the script did not produce a report. If the result differs, reconcile the path, interpreter, mode and execution policy before choosing a repair.

Once the same supplied ordinary file and only the known missing owner bit are established, the taught symbolic repair is:

chmod u+x -- handoff/bin/owner-report.sh
stat -c 'mode=%a uid=%u gid=%g links=%h file=%n' -- handoff/bin/owner-report.sh

Require only owner execute added, with owner/group and link count unchanged. No numeric mode is guessed, and no unrelated access or policy is changed.

3. Check the valid report and both rejection cases

Inspect the exact outer path, known handoff entries and complete script/input again. Require handoff/reports/owners.txt and outer valid.err absent before:

./handoff/bin/owner-report.sh 'handoff/data/workshop records.txt' > handoff/reports/owners.txt 2> valid.err
printf 'valid report exit: %s\n' "$?"

Require 0, then inspect:

ls -ld -- handoff/reports/owners.txt valid.err
cat handoff/reports/owners.txt
cat valid.err
wc -l -- handoff/reports/owners.txt

Require the exact six owners/newlines from the acceptance data and zero-byte stderr, not merely zero newline count. Both Ashas and both Miras remain. The initial denial followed by success after the one-bit change supports this particular repair; it is not a rule that every execution failure needs chmod. Preserve nonzero or partial output as incomplete evidence.

After confirming the two no-argument captures absent:

./handoff/bin/owner-report.sh > no-argument.out 2> no-argument.err
printf 'no-argument exit: %s\n' "$?"

Require 2. Inspect the actual files before another test:

ls -ld -- no-argument.out no-argument.err
cat no-argument.out
cat no-argument.err

Require zero-byte stdout and exactly Usage: owner-report.sh INPUT plus a newline on stderr. Now inspect the working-input inventory and outer files:

ls -a -- handoff/data
ls -a

Require handoff/data/missing.txt and both missing captures absent before:

./handoff/bin/owner-report.sh handoff/data/missing.txt > missing.out 2> missing.err
printf 'missing-input exit: %s\n' "$?"

Require 3, then inspect:

ls -ld -- missing.out missing.err
cat missing.out
cat missing.err
cat 'inbox/workshop records.txt'
cat 'handoff/data/workshop records.txt'

Require zero-byte stdout, exactly Input must be a regular file. plus a newline on stderr, and both inputs still containing the six supplied records. The deliberate status is interpreted together with its diagnostics. A later successful cat cannot replace the script's previously recorded status.

4. Archive only the accepted handoff

Recheck all three handoff files as ordinary owned single-link entries, their complete contents and the live script's expected one-bit mode difference. Inspect each directory and require only the requested files. Require the outer archive name absent and the same tool-default baseline.

The already taught tar -c/-z/-f create a gzip archive at the explicit outer filename. -C handoff changes lookup for the following member operands; it does not move the parent shell or add a handoff prefix. After acceptance:

tar -c -z -f workspace-handoff.tar.gz -C handoff -- 'data/workshop records.txt' bin/owner-report.sh reports/owners.txt
printf 'archive create exit: %s\n' "$?"

Require 0 without unexpected diagnostics. Tar opens the archive itself; an existing or partial archive must not be overwritten by blindly repeating this command. Inspect before reading it:

ls -ld -- workspace-handoff.tar.gz

Require the new recognized ordinary owned single-link archive. Then use the taught compression-integrity test:

gzip -t -- workspace-handoff.tar.gz
printf 'gzip test exit: %s\n' "$?"

Require 0. An error or warning stops this exercise. Next list members:

tar -t -z -f workspace-handoff.tar.gz
printf 'archive list exit: %s\n' "$?"

Require 0 and exactly the three manifest names, each once. Display quoting of a space may vary; identify the actual member name. Then check types:

tar -t -v -z -f workspace-handoff.tar.gz
printf 'archive type-list exit: %s\n' "$?"

Require 0 and three regular-file entries whose GNU verbose mode/type field begins with -. Reject a link, directory member, unexplained type or name; do not strip surprising paths and continue. These checks concern the archive just created from this owned source, not arbitrary outside archives. Correct compression alone would not establish the requested member set.

5. Restore to a separate empty root

Require restored absent in the checked outer inventory before:

mkdir restored
ls -ld -- restored
ls -a -- restored

Accept the new ordinary owned directory containing only dot entries. Recheck the archive identity, all passed checks and exact outer pwd. Only then:

tar -x -z -f workspace-handoff.tar.gz -C restored
printf 'archive restore exit: %s\n' "$?"

Require 0. The relative file members create their needed parents beneath restored, not beneath an extra handoff directory. Inspect all entries:

ls -a -- restored
ls -ld -- restored/data restored/bin restored/reports
ls -a -- restored/data restored/bin restored/reports
ls -ld -- 'restored/data/workshop records.txt' restored/bin/owner-report.sh restored/reports/owners.txt

Require exactly the three ordinary owned directories and their three ordinary owned single-link files. Compare the entire input in all locations:

cat 'inbox/workshop records.txt'
cat 'handoff/data/workshop records.txt'
cat 'restored/data/workshop records.txt'
wc -l -- 'inbox/workshop records.txt' 'handoff/data/workshop records.txt' 'restored/data/workshop records.txt'

Require six exact records/newlines per file, total 18 newlines. Then compare the complete maintained and restored script:

cat handoff/bin/owner-report.sh
cat restored/bin/owner-report.sh
wc -l -- handoff/bin/owner-report.sh restored/bin/owner-report.sh

Require all 20 exact lines/newlines in each, total 40. Inspect both reports:

cat handoff/reports/owners.txt
cat restored/reports/owners.txt
wc -l -- handoff/reports/owners.txt restored/reports/owners.txt

Require the six exact owner occurrences/newlines in each, total 12. Counts support complete text comparison; they cannot establish the words alone. Restored modes need not equal source modes. Require actual read/path access for the next explicit-interpreter run; preserve an unexpected access policy instead of applying a second permission repair.

6. Check the restored script against its restored input

Recheck the saved script, interpreter/startup baseline, restored ownership and input contract. Require restored-run.out/.err absent before:

/bin/bash --noprofile --norc restored/bin/owner-report.sh 'restored/data/workshop records.txt' > restored-run.out 2> restored-run.err
printf 'restored report exit: %s\n' "$?"

Require 0, then inspect:

ls -ld -- restored-run.out restored-run.err
cat restored-run.out
cat restored-run.err
wc -l -- handoff/reports/owners.txt restored/reports/owners.txt restored-run.out
set -o
declare -p LC_ALL LC_COLLATE LANG

Require the same six exact report lines in all three locations, six newlines each and total 18, plus zero-byte restored stderr. Require the recorded parent options and named locale states unchanged. The explicit interpreter reads the restored file without relying on its execute bit. It still needs the checked interpreter, input, read/path access and ordinary environment.

This run adds observed behavior to the text comparisons. It does not prove every possible input, application backup requirement or host environment.

Understanding-check feedback

  1. Parent quoting and quoted $1 preserve one spaced path. File predicates check current regular/readable conditions; the manual record inspection establishes this small input format. None alone supplies the other checks.
  2. The known file, owner, saved interpreter line, searchable path and recorded missing owner execute bit support a narrow repair. Only that bit changes, and the subsequent direct result checks the repaired behavior. Broad permissions or privileges would change unrelated conditions and obscure the demonstrated cause.
  3. A count can match while values or duplicates are wrong. A compressed stream can be valid while containing the wrong members or old content. Inspect the specific evidence needed for each acceptance condition.
  4. Running the restored code on restored data adds a behavioral comparison in this context. Users/groups, services, networks and other administration outcomes retain their earlier separate exercises; this small handoff is not a substitute for all of them or external grading.

Diagnose a difference without broad repair

ObservationNext taught evidence and boundary
Copy/move destination already existsInspect the exact entry and recorded stage; decline replacement and preserve it.
Direct run still fails after the one-bit repairRecheck path, owner/mode, shebang and execution policy. Stop rather than add sudo or more permissions.
Report has six lines but wrong valuesCompare all source rows and the saved field selection; retain duplicates and the scoped sort.
Script status is nonzero but stdout looks usableTreat the saved output as incomplete; preserve stderr and the immediate status.
Gzip passes, manifest differsDiagnose selected operands and source root before any extraction.
Restored names include an unwanted prefixCompare stored member names with the extraction root; do not move files merely to hide a wrong archive.
Restored script cannot be readInspect actual entry/access conditions; extraction is not a promise of identical modes.
An attempt was interruptedInspect the actual stage and retained evidence; an existing output does not prove its command completed.

Restore the live mode and clean up after acceptance

Finish the challenge, written explanations and all comparisons first. Check the known shared/task entries, then enter and verify in a separate block:

ls -ld ~/linux-practice
ls -ld ~/linux-practice/linux-workspace-challenge

After accepting their ordinary owned identities:

cd ~/linux-practice/linux-workspace-challenge
pwd

Require the exact recorded task path. Inspect the outer inventory and every directory without following a substituted link:

ls -a
ls -ld -- inbox handoff handoff/data handoff/bin handoff/reports restored restored/data restored/bin restored/reports
ls -a -- inbox handoff handoff/data handoff/bin handoff/reports restored restored/data restored/bin restored/reports
ls -ld -- 'inbox/workshop records.txt' 'handoff/data/workshop records.txt' handoff/bin/owner-report.sh handoff/reports/owners.txt 'restored/data/workshop records.txt' restored/bin/owner-report.sh restored/reports/owners.txt workspace-handoff.tar.gz
ls -ld -- before-repair.out before-repair.err valid.err no-argument.out no-argument.err missing.out missing.err restored-run.out restored-run.err
stat -c 'mode=%a uid=%u gid=%g links=%h file=%n' -- handoff/bin/owner-report.sh
cat handoff/bin/owner-report.sh

Require only the 17 recognized ordinary owned single-link files and nine ordinary owned directories in their expected places. Reconcile any uncertain contents before removal. The live script must still have its supplied text and only owner execute added to the recorded original mode. Because that one bit was initially absent, restore it after acceptance:

chmod u-x -- handoff/bin/owner-report.sh
stat -c 'mode=%a uid=%u gid=%g links=%h file=%n' -- handoff/bin/owner-report.sh

Require the complete recorded original mode, UID/GID and link count. This does not change the archive or restored copy; no permission edit was made to those entries. Do not guess a familiar numeric mode when a record is lost.

Establish the actual documented rm confirmation responses. The familiar English y/n convention is not permission to guess an unfamiliar response. Each target has its own prompt. To stop, decline that target and every remaining prompt; one refusal does not cancel the rest or authorize the next group. Remove only these checked owned capture/archive names:

rm -i -- before-repair.out before-repair.err valid.err no-argument.out no-argument.err missing.out missing.err restored-run.out restored-run.err workspace-handoff.tar.gz

Inspect the outer inventory and require those accepted removals complete. Then remove the three checked restored files:

rm -i -- 'restored/data/workshop records.txt' restored/bin/owner-report.sh restored/reports/owners.txt

Reinspect the known restored child identities and their empty inventories:

ls -ld -- restored/data restored/bin restored/reports
ls -a -- restored/data restored/bin restored/reports

Only after all three are empty:

rmdir -- restored/data restored/bin restored/reports
ls -ld -- restored
ls -a -- restored

Require the same owned restored root empty before:

rmdir -- restored

After rechecking the three live files and completed mode restoration:

rm -i -- 'handoff/data/workshop records.txt' handoff/bin/owner-report.sh handoff/reports/owners.txt

Inspect the live child directories before removing any:

ls -ld -- handoff/data handoff/bin handoff/reports
ls -a -- handoff/data handoff/bin handoff/reports

Only for the known empty children:

rmdir -- handoff/data handoff/bin handoff/reports
ls -ld -- handoff
ls -a -- handoff

Require handoff empty before:

rmdir -- handoff

Remove the retained original only now, after its completed comparisons:

rm -i -- 'inbox/workshop records.txt'
ls -ld -- inbox
ls -a -- inbox

Require the recognized inbox empty before:

rmdir -- inbox
ls -a

Require the task empty. Return to the shared root and accept its actual path before the final removal:

cd ~/linux-practice
pwd

Require the recorded shared-root path, then inspect the same empty task:

ls -ld -- linux-workspace-challenge

Only after accepting that ordinary owned entry:

rmdir -- linux-workspace-challenge

Retain ~/linux-practice, other lessons, tools, guest and all preexisting settings. Guest removal is a separate decision, not this cleanup procedure.

Resume from evidence, not from the top of the page

Recheck identity, shell/tool defaults, paths and all actual entries. The script may be in inbox or handoff/bin; its owner bit may still be absent, added or already restored. Use the original record and current metadata, not a guessed mode or repeated permission command. Keep the original input and recognize each complete or partial capture separately.

Do not replay seed redirection over an input, rerun a report over an existing capture, recreate an archive over its old name, or extract into a populated restore directory. A lost immediate status remains unknown; do not invent it from the existence of an output file.

For a failed report or partial archive, retain the relevant evidence until its cause is understood. A fresh retry first removes only its positively identified named owned outputs with the same interactive guard and confirms their names absent. For partial extraction, inspect the known restored paths actually present, remove only their recognized files, then empty child directories and the root. Repeat the archive checks before a fresh restore. Unexpected entries remain untouched. A full reset uses the same scoped cleanup and supplied starter; it never needs recursive deletion or a new VM.

Sources and other study views

The Bash/nano sources document the selected 5.2/7.2 families. Coreutils' upstream manual is newer than the guest's 9.4 tools; the tar 1.34 and Linux man-pages 6.03 references are companions, alongside the selected tar 1.35 and gzip 1.12 references. These sources explain the bounded mechanisms; your actual guest observations remain separate from the supplied targets.

Revision reconstructs the decisions and acceptance criteria. Quick Reference retrieves the established patterns after the complete challenge and its guards.

Study this course with an account

Course access adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 99 plus 18% GST. 90 days of online access. No auto-renewal.

See course access

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy