From e976b55a5c2a83f4f2ab1221ea228c9b8737db4f Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:32:09 -0500 Subject: [PATCH 1/6] delete ip logs... WARNING UNTESTED! --- 02_activities/assignments/assignment.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index d81e9a77b..001291867 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -33,6 +33,7 @@ unzip rawdata.zip # 6. Repeat the above step for user logs and event logs # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs +rf -rf ./data # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed From ea20676d33161a6f4d0fcd3c4f7aa5360f0f4309 Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:55:44 -0500 Subject: [PATCH 2/6] initialize README file with company name --- 02_activities/assignments/assignment.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 001291867..f2bfd22bd 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -11,6 +11,7 @@ set -x mkdir analysis output touch README.md +echo "# Project Name: DSI Consulting Inc." > README.md touch analysis/main.py # download client data From 1078e8fa1c665d7ae87653c3dcf65f1e64ce2aae Mon Sep 17 00:00:00 2001 From: Jonathan Nahmiach <98768155+Jona-Jona-Jona@users.noreply.github.com> Date: Mon, 13 Apr 2026 18:03:02 -0400 Subject: [PATCH 3/6] Updated script to automate initial organization of client data files --- 02_activities/assignments/assignment.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4b48cec8b..1e38975cf 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -28,22 +28,42 @@ unzip -q rawdata.zip # Complete assignment here # 1. Create a directory named data +mkdir "data" # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) +mv rawdata data +cd data +mv rawdata raw # 3. List the contents of the ./data/raw directory +cd raw +ls # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and event_logs +cd .. +mkdir processed +cd processed +mkdir server_logs user_logs event_logs # 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs +cd .. +cd raw +cp server*.log ../processed/server_logs # 6. Repeat the above step for user logs and event logs +cp user*.log ../processed/user_logs +cp event*.log ../processed/event_logs # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs +cd .. +rm raw/ipaddr* +rm raw/*ipaddr* +rm processed/user_logs/ipaddr* +rm processed/user_logs/*ipaddr* # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed - +find processed -type f -print > inventory.txt ########################################### From 359d57a16ba84de85f4de78627f43978cdee9cba Mon Sep 17 00:00:00 2001 From: Jonathan Nahmiach <98768155+Jona-Jona-Jona@users.noreply.github.com> Date: Mon, 13 Apr 2026 19:03:36 -0400 Subject: [PATCH 4/6] Changed step 8 to work with autograder --- 02_activities/assignments/assignment.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 679f079f8..7fca14be2 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -64,7 +64,8 @@ rm processed/user_logs/ipaddr* rm processed/user_logs/*ipaddr* # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed -find processed -type f -print > inventory.txt +cd processed +ls * > inventory.txt ########################################### From b59da4be86b83cf1dabfcab2e9eff082ef44e333 Mon Sep 17 00:00:00 2001 From: Jonathan Nahmiach <98768155+Jona-Jona-Jona@users.noreply.github.com> Date: Mon, 13 Apr 2026 19:13:48 -0400 Subject: [PATCH 5/6] Changed step 3 to list correct directory and rolled back changes to step 8 --- 02_activities/assignments/assignment.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 7fca14be2..2875dab7e 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -38,7 +38,7 @@ mv rawdata raw # 3. List the contents of the ./data/raw directory cd raw -ls +ls raw # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and event_logs @@ -64,8 +64,7 @@ rm processed/user_logs/ipaddr* rm processed/user_logs/*ipaddr* # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed -cd processed -ls * > inventory.txt +find processed -type f -print > inventory.txt ########################################### From 9dc65a64ed4dfe738260c64c8fc40419cce6fee1 Mon Sep 17 00:00:00 2001 From: Jonathan Nahmiach <98768155+Jona-Jona-Jona@users.noreply.github.com> Date: Mon, 13 Apr 2026 19:21:27 -0400 Subject: [PATCH 6/6] Additional debugging for 3 --- 02_activities/assignments/assignment.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 2875dab7e..fdd22f7ce 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -38,7 +38,8 @@ mv rawdata raw # 3. List the contents of the ./data/raw directory cd raw -ls raw +pwd +ls ./data/raw # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and event_logs