From fc9ce1bfd85c685b9dd57d7b61ce8e6884377772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Moska=C5=82a?= Date: Wed, 8 Jul 2026 20:19:20 +0200 Subject: [PATCH 1/3] Homework --- homework/linux.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/homework/linux.txt b/homework/linux.txt index e69de29b..bbcafce1 100644 --- a/homework/linux.txt +++ b/homework/linux.txt @@ -0,0 +1,16 @@ +4 + 1633 1 1633 39052 ? 4096 20:09:18 /usr/bin/mintty + 1669 1634 1669 43728 pty0 4096 20:11:18 /usr/bin/ps + 1634 1633 1634 8152 pty0 4096 20:09:18 /usr/bin/bash + 123 cd my_homework/ + 124 touch processes.txt + 125 ps aux > processes.txt + 126 cp processes.txt copy.txt + 127 mkdir backup + 128 mv copy.txt backup/ + 129 wc -l < processes.txt > selected.txt + 130 cat processes.txt | grep /bin + 131 cat processes.txt | grep /bin >> selected.txt + 132 history | tail --lines=25 + 133 history | tail --lines=11 + 134 history | tail --lines=12 > commands.txt From bd8fd4f9c3d07da237ddc1903f2c7cae2ca08282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Moska=C5=82a?= Date: Wed, 8 Jul 2026 20:28:07 +0200 Subject: [PATCH 2/3] Another way of filtering /bin --- homework/linux.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homework/linux.txt b/homework/linux.txt index bbcafce1..2373a7cb 100644 --- a/homework/linux.txt +++ b/homework/linux.txt @@ -10,7 +10,9 @@ 128 mv copy.txt backup/ 129 wc -l < processes.txt > selected.txt 130 cat processes.txt | grep /bin - 131 cat processes.txt | grep /bin >> selected.txt + 131 grep -n "/bin" processes.txt >> selected.txt 132 history | tail --lines=25 133 history | tail --lines=11 134 history | tail --lines=12 > commands.txt + + From ceee786f34bb46514ac46a9500a7eaf96f401801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Moska=C5=82a?= <57830815+mmoskala07@users.noreply.github.com> Date: Wed, 8 Jul 2026 20:33:12 +0200 Subject: [PATCH 3/3] Another way of showing history with tail --- homework/linux.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homework/linux.txt b/homework/linux.txt index 2373a7cb..e0c344a3 100644 --- a/homework/linux.txt +++ b/homework/linux.txt @@ -13,6 +13,7 @@ 131 grep -n "/bin" processes.txt >> selected.txt 132 history | tail --lines=25 133 history | tail --lines=11 - 134 history | tail --lines=12 > commands.txt + 134 history | tail -10 > commands.txt + 135 cat selected.txt commands.txt