From e976b55a5c2a83f4f2ab1221ea228c9b8737db4f Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:32:09 -0500 Subject: [PATCH 1/8] 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/8] 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 8afa915c506c596bb5fd989e1f57bb65265a59f1 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:56:19 -0500 Subject: [PATCH 3/8] question 1 --- 02_activities/assignments/assignment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4b2baa7ae..d93e23c91 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -28,7 +28,7 @@ unzip -q rawdata.zip # Complete assignment here # 1. Create a directory named data - +mkdir data # 2. Move the ./rawdata directory to ./data/raw # 3. List the contents of the ./data/raw directory From b2d8b56f31d1166f3ad88d4324740264550d25d3 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:48:55 -0500 Subject: [PATCH 4/8] second and third question and started other questions --- 02_activities/assignments/assignment.sh | 37 ++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index d93e23c91..d8f34e1cf 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -30,20 +30,25 @@ unzip -q rawdata.zip # 1. Create a directory named data mkdir data # 2. Move the ./rawdata directory to ./data/raw - +mv -r .rawdata ./data/raw # 3. List the contents of the ./data/raw directory - -# 4. In ./data/processed, create the following directories: server_logs, user_logs, and 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 - -# 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 - -# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed - - -########################################### - -echo "Project setup is complete!" +ls .data/raw directory +# # 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs +# mkdir -p .data/processed/server_logs +# mkdir .data/processed/user_logs +# mkdir .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 ./data/processed/server_logs +# # 6. Repeat the above step for user logs and event logs +# cp ./data/raw/*user*.log ./data/processed/server_logs +# cp ./data/raw/*event*.log ./data/processed/server_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 +# rm -f ./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 + +# find ./data/processed -type f>> ./data/inventory.txt +# ########################################### + +# echo "Project setup is complete!" From c1f7657bac95c5a2cb71b9822a517661bbcb2cc8 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:07:33 -0500 Subject: [PATCH 5/8] added rest of questions --- 02_activities/assignments/assignment.sh | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index d8f34e1cf..a7a1126c3 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -30,25 +30,25 @@ unzip -q rawdata.zip # 1. Create a directory named data mkdir data # 2. Move the ./rawdata directory to ./data/raw -mv -r .rawdata ./data/raw +mv .rawdata ./data/raw # 3. List the contents of the ./data/raw directory ls .data/raw directory -# # 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs -# mkdir -p .data/processed/server_logs -# mkdir .data/processed/user_logs -# mkdir .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 ./data/processed/server_logs -# # 6. Repeat the above step for user logs and event logs -# cp ./data/raw/*user*.log ./data/processed/server_logs -# cp ./data/raw/*event*.log ./data/processed/server_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 -# rm -f ./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 - -# find ./data/processed -type f>> ./data/inventory.txt -# ########################################### - -# echo "Project setup is complete!" +# 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs +mkdir .data/processed/server_logs +mkdir .data/processed/user_logs +mkdir .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 ./data/processed/server_logs +# 6. Repeat the above step for user logs and event logs +cp ./data/raw/*user*.log ./data/processed/server_logs +cp ./data/raw/*event*.log ./data/processed/server_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 +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 + +find ./data/processed -type f>> ./data/inventory.txt +########################################### + +echo "Project setup is complete!" From 794e9ab5079e9ebbbf7143fd048a93c81a9e7917 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:20:46 -0500 Subject: [PATCH 6/8] fixed issues causing raw data not to move and creating .data folder: . replaced by ./ --- 02_activities/assignments/assignment.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index a7a1126c3..05b7a8149 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -30,13 +30,13 @@ unzip -q rawdata.zip # 1. Create a directory named data mkdir data # 2. Move the ./rawdata directory to ./data/raw -mv .rawdata ./data/raw +mv ./rawdata ./data/raw # 3. List the contents of the ./data/raw directory -ls .data/raw directory +ls ./data/raw directory # 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs -mkdir .data/processed/server_logs -mkdir .data/processed/user_logs -mkdir .data/processed/event_logs +mkdir -p ./data/processed/server_logs +mkdir -p ./data/processed/user_logs +mkdir -p ./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 ./data/processed/server_logs # 6. Repeat the above step for user logs and event logs From 2dd8add36244c2c890e8725340f5fdab2f663332 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Sun, 8 Feb 2026 04:22:19 -0500 Subject: [PATCH 7/8] additional changes to make sure that the user and event files went to the right place (i.e. fixing Q6) --- 02_activities/assignments/assignment.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 05b7a8149..c78333b46 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -32,7 +32,7 @@ mkdir data # 2. Move the ./rawdata directory to ./data/raw mv ./rawdata ./data/raw # 3. List the contents of the ./data/raw directory -ls ./data/raw directory +ls ./data/raw # 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs mkdir -p ./data/processed/server_logs mkdir -p ./data/processed/user_logs @@ -40,8 +40,8 @@ mkdir -p ./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 ./data/processed/server_logs # 6. Repeat the above step for user logs and event logs -cp ./data/raw/*user*.log ./data/processed/server_logs -cp ./data/raw/*event*.log ./data/processed/server_logs +cp ./data/raw/*user*.log ./data/processed/user_logs +cp ./data/raw/*event*.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 rm ./data/raw/*ipaddr* From e0aa14beb6fe8768c6ca57095b80695021106d86 Mon Sep 17 00:00:00 2001 From: dhamijap <43151141+dhamijap@users.noreply.github.com> Date: Mon, 23 Feb 2026 18:18:06 -0500 Subject: [PATCH 8/8] updated for DSI course --- 02_activities/assignments/assignment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 855028e32..c93fd0c95 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -52,4 +52,4 @@ rm ./data/processed/user_logs/*ipaddr* find ./data/processed -type f>> ./data/inventory.txt ########################################### -echo "Project setup is complete!" +echo "Project setup is complete! Yay!"