From 2889c665138850e0c0607dc4c1c5f7141727020f Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Thu, 9 Apr 2026 23:32:19 -0400 Subject: [PATCH 01/10] create a directory named data --- 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 4b48cec8b..7049322b3 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -28,6 +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 (eg. move it into ./data and rename it to raw) From 69ae2e9aaa6fd8b730177fc433f819510e5933d8 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Thu, 9 Apr 2026 23:42:08 -0400 Subject: [PATCH 02/10] move rawdata directory to data and rename it into raw --- 02_activities/assignments/assignment.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 7049322b3..75aca3b54 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -31,6 +31,8 @@ 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 rawdata data +mv rawdata raw # 3. List the contents of the ./data/raw directory From 47f9d463ac385aa0af6af9cfec940d68dea0f9d9 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Thu, 9 Apr 2026 23:51:01 -0400 Subject: [PATCH 03/10] list the contents of the raw directory --- 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 75aca3b54..c24a67c45 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -32,9 +32,10 @@ mkdir data # 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw) mv rawdata data -mv rawdata raw +mv ./data/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 From 3193e3d043bbcff46232fa558bf989b94afe9acd Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Thu, 9 Apr 2026 23:56:17 -0400 Subject: [PATCH 04/10] create directory processed and three sub-directories --- 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 c24a67c45..fd8829d37 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -39,6 +39,7 @@ 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/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 From edadc85a7f1de9dbf37ec195dd08885a47e0f326 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 00:03:12 -0400 Subject: [PATCH 05/10] copy all server log files into processed server log --- 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 fd8829d37..ab7d085fc 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -42,6 +42,7 @@ ls ./data/raw 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 From a234f868efd6fc503f0eb8ac5ca0c36be1d0dcb3 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 00:03:55 -0400 Subject: [PATCH 06/10] repeat the same for user and event logs --- 02_activities/assignments/assignment.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index ab7d085fc..9c0d0d0e3 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -42,9 +42,11 @@ ls ./data/raw 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/ +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/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 From 59a1f43e3e6084d75f25e1f23f8be568b9c8406c Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 00:07:22 -0400 Subject: [PATCH 07/10] remove all files containing IP address with ipaddr in the filename from raw and processed user logs --- 02_activities/assignments/assignment.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 9c0d0d0e3..cfce3886d 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -49,6 +49,8 @@ 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* +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 From f4a172175f6ad99227bc66c6e72b556bb89109b0 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 00:13:34 -0400 Subject: [PATCH 08/10] create a file name invnentory and list all files in the subfolers of processed --- 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 cfce3886d..87e3ae122 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -49,11 +49,11 @@ 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* +rm ./data/raw/user_logs/*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 - +ls ./data/processed/* > ./data/inventory.txt ########################################### From 815795c6a5339abde9e4524f1cf9c6beba4e99e5 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 09:51:02 -0400 Subject: [PATCH 09/10] add little changes in 4 --- 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 87e3ae122..f9eeb264c 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -39,6 +39,7 @@ 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 From 5c796a7605ef4dc7406e0fb94aa164ffbce156f6 Mon Sep 17 00:00:00 2001 From: YipingMa9377 Date: Fri, 10 Apr 2026 10:09:30 -0400 Subject: [PATCH 10/10] add a samll change in 7 --- 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 f9eeb264c..ce259957d 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -50,7 +50,7 @@ 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/user_logs/*ipaddr* +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