From 916ab418ee5f7300b14a3fd8d5e9a1a8fc12b235 Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 02:14:19 +0600 Subject: [PATCH 1/6] added app.log of TASK1.txt --- linux/task1-answer/app.log | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 linux/task1-answer/app.log diff --git a/linux/task1-answer/app.log b/linux/task1-answer/app.log new file mode 100644 index 0000000..51f7973 --- /dev/null +++ b/linux/task1-answer/app.log @@ -0,0 +1,11 @@ +2025-09-23 01:00:12 INFO Server started on port 8080 +2025-09-23 01:01:45 DEBUG Initializing configuration files +2025-09-23 01:02:18 INFO User zahid logged in from 192.168.1.12 +2025-09-23 01:03:05 ERROR Database connection failed: timeout reached +2025-09-23 01:03:47 DEBUG Session token generated for user zahid +2025-09-23 01:04:22 INFO File upload started: report.pdf +2025-09-23 01:05:00 ERROR File upload failed: insufficient storage +2025-09-23 01:05:55 DEBUG Retrying connection to cache server +2025-09-23 01:06:30 INFO Scheduled backup completed successfully +2025-09-23 01:07:14 ERROR Service unavailable: authentication service down +2025-09-23 01:08:42 INFO User zahid logged out From 8cfee2807e57d2c5c6af4ac3d7597e9dcbc9b899 Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 02:31:05 +0600 Subject: [PATCH 2/6] added find_errors.sh and extract ERROR logs from app.log --- linux/task1-answer/app.log | 0 linux/task1-answer/find_errors.sh | 3 +++ 2 files changed, 3 insertions(+) mode change 100644 => 100755 linux/task1-answer/app.log create mode 100755 linux/task1-answer/find_errors.sh diff --git a/linux/task1-answer/app.log b/linux/task1-answer/app.log old mode 100644 new mode 100755 diff --git a/linux/task1-answer/find_errors.sh b/linux/task1-answer/find_errors.sh new file mode 100755 index 0000000..55c3eec --- /dev/null +++ b/linux/task1-answer/find_errors.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +grep "ERROR" app.log \ No newline at end of file From da93a9caba67a272f97089282bf2ff06b3dd756e Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 02:43:17 +0600 Subject: [PATCH 3/6] Run find_errors.sh and display ERROR logs from app.log --- linux/task1-answer/find_errors.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/task1-answer/find_errors.sh b/linux/task1-answer/find_errors.sh index 55c3eec..6956586 100755 --- a/linux/task1-answer/find_errors.sh +++ b/linux/task1-answer/find_errors.sh @@ -1,3 +1,4 @@ #!/bin/bash +echo "Showing ERROR logs from app.log:" grep "ERROR" app.log \ No newline at end of file From b5b3519bc37b2ce28f6d6de3d350131b7e3fb9c6 Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 10:47:22 +0600 Subject: [PATCH 4/6] Task 1: Setup project structure Task 2: Added initial feature module --- linux/task2-answer/project/notes.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 linux/task2-answer/project/notes.txt diff --git a/linux/task2-answer/project/notes.txt b/linux/task2-answer/project/notes.txt new file mode 100644 index 0000000..9ccb47a --- /dev/null +++ b/linux/task2-answer/project/notes.txt @@ -0,0 +1,12 @@ +2025-09-23 01:00:12 INFO Server started on port 8080 +2025-09-23 01:01:45 DEBUG Initializing configuration files +2025-09-23 01:02:18 INFO User zahid logged in from 192.168.1.12 +2025-09-23 01:03:05 ERROR Database connection failed: timeout reached +2025-09-23 01:03:47 DEBUG Session token generated for user zahid +2025-09-23 01:04:22 INFO File upload started: report.pdf +2025-09-23 01:05:00 ERROR File upload failed: insufficient storage +2025-09-23 01:05:55 DEBUG Retrying connection to cache server +2025-09-23 01:06:30 INFO Scheduled backup completed successfully +2025-09-23 01:07:14 ERROR Service unavailable: authentication service down +2025-09-23 01:08:42 INFO User zahid logged out +Adding text using echo From ccfc26556ce2896145dc31ba781f4366f9293a00 Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 10:54:44 +0600 Subject: [PATCH 5/6] Task 3: Check file permissions of notes.txt Task 4: Update permissions using chmod (owner rwx, group r--, others r--) Task 5: Change ownership of notes.txt to root and verify Task 6: Show final permissions and ownership with ls -l project/notes.txt --- linux/task2-answer/project/notes.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 linux/task2-answer/project/notes.txt diff --git a/linux/task2-answer/project/notes.txt b/linux/task2-answer/project/notes.txt old mode 100644 new mode 100755 From 3e1e9ca6168189a078a4f212981aab7025e7e1c4 Mon Sep 17 00:00:00 2001 From: zahid-0x80 Date: Tue, 23 Sep 2025 11:29:48 +0600 Subject: [PATCH 6/6] Added Bash script to read email and password from user and print confirmation --- linux/task3-answer/read_email_password.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 linux/task3-answer/read_email_password.sh diff --git a/linux/task3-answer/read_email_password.sh b/linux/task3-answer/read_email_password.sh new file mode 100755 index 0000000..21b3c0f --- /dev/null +++ b/linux/task3-answer/read_email_password.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Ask for email +echo "Enter your email:" +read email + +# Ask for password +echo "Enter your password:" +read password + +# Print confirmation +echo "Your email is: $email" +echo "Your password is: $password" \ No newline at end of file