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 0a1280ee09387e962cccb68de7e5709168135c5a Mon Sep 17 00:00:00 2001 From: guimardsyvrain Date: Mon, 13 Apr 2026 18:15:42 -0400 Subject: [PATCH 3/6] Update assignment.sh --- 02_activities/assignments/assignment.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4b48cec8b..7c8524b93 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -28,22 +28,37 @@ 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 newproject/rawdata data/raw # 3. List the contents of the ./data/raw directory +ls data/raw # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and 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 +cp data/raw/server_log_* data/processed/server_logs # 6. Repeat the above step for user logs and event logs +cp data/raw/user_* 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 +#remove all files with "ipaddr" from raw directory +rm -i data/raw/*.txt data/raw/user_ipaddr_* -# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed +#remove all files with "ipaddr" from user_logs directory +rm data/processed/user_logs/user_ipaddr_* +# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed +ls data/processed/user_logs >inventory.txt +ls data/processed/server_logs >>inventory.txt +ls data/processed/event_logs >>inventory.txt ########################################### From c5754f603ee5b5299be2b4494642c6ffbb26882f Mon Sep 17 00:00:00 2001 From: guima Date: Mon, 13 Apr 2026 21:49:30 -0400 Subject: [PATCH 4/6] Modifiying assignment shell file to update it --- 02_activities/assignments/assignment.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 37b1c993d..41bb11200 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -32,7 +32,7 @@ unzip -q rawdata.zip mkdir data # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) -mv newproject/rawdata data/raw +mv rawdata data/raw # 3. List the contents of the ./data/raw directory ls data/raw @@ -50,15 +50,12 @@ cp data/raw/user_* 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 -<<<<<<< HEAD #remove all files with "ipaddr" from raw directory rm -i data/raw/*.txt data/raw/user_ipaddr_* #remove all files with "ipaddr" from user_logs directory rm data/processed/user_logs/user_ipaddr_* -======= -rf -rf ./data ->>>>>>> ea20676d33161a6f4d0fcd3c4f7aa5360f0f4309 + # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed ls data/processed/user_logs >inventory.txt From 25e80fcd1b5e8593d8d4aad4dda96020a58be2fa Mon Sep 17 00:00:00 2001 From: guimardsyvrain Date: Mon, 13 Apr 2026 21:53:21 -0400 Subject: [PATCH 5/6] Update assignment.sh --- 02_activities/assignments/assignment.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 4b48cec8b..8c75586d9 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -28,7 +28,6 @@ unzip -q rawdata.zip # Complete assignment here # 1. Create a directory named data - # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) # 3. List the contents of the ./data/raw directory From 99714b10dfe4eb4df982db1c2bb150ac1906a4f8 Mon Sep 17 00:00:00 2001 From: guimardsyvrain Date: Mon, 13 Apr 2026 22:22:53 -0400 Subject: [PATCH 6/6] Revert "University of Toronto - DSI | Shell -Assignment 1" --- 02_activities/assignments/assignment.sh | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 41bb11200..8c75586d9 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -18,7 +18,6 @@ cd newproject mkdir analysis output touch README.md -echo "# Project Name: DSI Consulting Inc." > README.md touch analysis/main.py # download client data @@ -29,38 +28,21 @@ 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/raw # 3. List the contents of the ./data/raw directory -ls data/raw # 4. Create the directory ./data/processed, # then create the following sub-directories within it: server_logs, user_logs, and 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 -cp data/raw/server_log_* data/processed/server_logs # 6. Repeat the above step for user logs and event logs -cp data/raw/user_* 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 -#remove all files with "ipaddr" from raw directory -rm -i data/raw/*.txt data/raw/user_ipaddr_* - -#remove all files with "ipaddr" from user_logs directory -rm data/processed/user_logs/user_ipaddr_* - # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed -ls data/processed/user_logs >inventory.txt -ls data/processed/server_logs >>inventory.txt -ls data/processed/event_logs >>inventory.txt + ###########################################