From e976b55a5c2a83f4f2ab1221ea228c9b8737db4f Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:32:09 -0500 Subject: [PATCH 1/7] 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/7] 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 2e65f67c482fdafd1ddf82523e92b522e20a5ff3 Mon Sep 17 00:00:00 2001 From: shima Date: Sun, 26 Jul 2026 23:50:19 -0400 Subject: [PATCH 3/7] complete my assignment --- 02_activities/assignments/assignment.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4b48cec8b..f0172c401 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -29,22 +29,39 @@ unzip -q rawdata.zip # 1. Create a directory named data +Answer1: mkdir data + # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) +Answer2: mv rawdat data/raw + # 3. List the contents of the ./data/raw directory +Answer3: ls data/raw + # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and event_logs +Answer4: mkdir data/processed + mkdir processed/server_logs processed/user_logs processed/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 +Answer5: cp raw/server_log*.log processed/server_logs + # 6. Repeat the above step for user logs and event logs +Answer6: cp raw/user_log*.log processed/user_logs + cp raw/user_ipaddr*.log processed/user_logs + cp raw/event_log*.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 -# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed +Answer7: rm raw/user_ipaddr*.log + rm processed/user_logs/user_ipaddr*.log +# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed +Answer8: ls -R data/processed > data/inventory.txt ########################################### echo "Project setup is complete!" From 096a9e5162e7fddacaf5252e1247b3cfedf46b8f Mon Sep 17 00:00:00 2001 From: shima Date: Mon, 27 Jul 2026 00:42:23 -0400 Subject: [PATCH 4/7] Trigger GitHub Actions From d6684faa52cfc3bd052e6211660ba283355d437b Mon Sep 17 00:00:00 2001 From: shima Date: Mon, 27 Jul 2026 01:01:44 -0400 Subject: [PATCH 5/7] Fix assignment --- 02_activities/assignments/assignment.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index f0172c401..1a88f689b 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -29,39 +29,39 @@ unzip -q rawdata.zip # 1. Create a directory named data -Answer1: mkdir data + mkdir data # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) -Answer2: mv rawdat data/raw + mv rawdat data/raw # 3. List the contents of the ./data/raw directory -Answer3: ls data/raw + ls data/raw # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and event_logs -Answer4: mkdir data/processed - mkdir processed/server_logs processed/user_logs processed/event_logs + mkdir data/processed + mkdir data/processed/server_logs data/processed/user_logs data/processed/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 -Answer5: cp raw/server_log*.log processed/server_logs + cp data/raw/server_log*.log data/processed/server_logs # 6. Repeat the above step for user logs and event logs -Answer6: cp raw/user_log*.log processed/user_logs - cp raw/user_ipaddr*.log processed/user_logs - cp raw/event_log*.log processed/event_logs + cp data/raw/user_log*.log data/processed/user_logs + cp data/raw/user_ipaddr*.log data/processed/user_logs + cp data/raw/event_log*.log data/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 -Answer7: rm raw/user_ipaddr*.log - rm processed/user_logs/user_ipaddr*.log + rm data/raw/user_ipaddr*.log + rm data/processed/user_logs/user_ipaddr*.log # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed -Answer8: ls -R data/processed > data/inventory.txt + ls -R data/processed > data/inventory.txt ########################################### echo "Project setup is complete!" From 1e14a8426a6edd428b83df53a64a351d9337f1ea Mon Sep 17 00:00:00 2001 From: shima Date: Sat, 1 Aug 2026 01:34:58 -0400 Subject: [PATCH 6/7] Fix file patterns --- 02_activities/assignments/assignment.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 3048dad8f..4564658dc 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -34,7 +34,7 @@ unzip -q rawdata.zip # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) - mv rawdat data/raw + mv rawdata data/raw # 3. List the contents of the ./data/raw directory @@ -47,16 +47,15 @@ unzip -q rawdata.zip mkdir data/processed/server_logs data/processed/user_logs data/processed/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 - cp data/raw/server_log*.log data/processed/server_logs + cp data/raw/server_log_*.log data/processed/server_logs # 6. Repeat the above step for user logs and event logs - cp data/raw/user_log*.log data/processed/user_logs - cp data/raw/user_ipaddr*.log data/processed/user_logs - cp data/raw/event_log*.log data/processed/event_logs + cp data/raw/user_log_*.log data/processed/user_logs + cp data/raw/event_log_*.log data/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 -rf -rf ./data + rm data/raw/user_ipaddr*.log rm data/processed/user_logs/user_ipaddr*.log From 851470a003e4c353ccf9750a99f020caddae2b9e Mon Sep 17 00:00:00 2001 From: shima Date: Sat, 1 Aug 2026 01:41:27 -0400 Subject: [PATCH 7/7] Fix q7 --- 02_activities/assignments/assignment.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4564658dc..fcc814124 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -57,8 +57,8 @@ unzip -q rawdata.zip # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs - rm data/raw/user_ipaddr*.log - rm data/processed/user_logs/user_ipaddr*.log + rm data/raw/*ipaddr* + rm data/processed/user_logs/*ipaddr* # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed