Advertisement
sandervanvugt

linfun feb23 day2

Feb 9th, 2023
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.20 KB | None | 0 0
  1. [root@localhost ~]# history
  2. 1 whoami
  3. 2 exit
  4. 3 cd /var/log
  5. 4 pwd
  6. 5 exit
  7. 6 history
  8. 7 cd /proc/pid
  9. 8 cd /proc/454/
  10. 9 ls
  11. 10 c dns
  12. 11 cd ns
  13. 12 ls
  14. 13 tree
  15. 14 lsns
  16. 15 d ..
  17. 16 cd ..
  18. 17 ls
  19. 18 cat cgroup
  20. 19 cgls
  21. 20 ldd $(which system-cgls)
  22. 21 ldd $(which systemd-cgls)
  23. 22 cd
  24. 23 exit
  25. 24 mkdir /root/bob; find / -user bob -exec cp -a {} /root/bob/ \;
  26. 25 ls -a /root/bob/
  27. 26 exit
  28. 27 tar -cvf archive.tar /home
  29. 28 tar -tvf archive.tar
  30. 29 tar -xvf archive.tar
  31. 30 ls
  32. 31 tar -xvf archive.tar -C /tmp
  33. 32 ls -l /tmp
  34. 33 tar -czvf archive.tar.gz /home
  35. 34 tar -cjvf archive.tar.bz /home
  36. 35 tar -cJvf archive.tar.xz /home
  37. 36 ls -l archive.tar*
  38. 37 history
  39. 38 exit
  40. 39 history
  41. 40 man cp
  42. 41 mkdir -p /tmp/files/pictures /tmp/files/photos /tmp/files/videos
  43. 42 cp /etc/[abc]* /tmp/files
  44. 43 cd /tmp/files
  45. 44 mv [ab]* photos/
  46. 45 ls
  47. 46 mv c* videos/
  48. 47 man find
  49. 48 find /etc -size -1000c
  50. 49 find /etc -size -1000c -exec cp {} pictures/
  51. 50 find /etc -size -1000c -exec cp {} pictures/ \;
  52. 51 ln -s /var .
  53. 52 ls
  54. 53 ls -l
  55. 54 tar -czvf home.tgz /home
  56. 55 pwd
  57. 56 mkdir ../archive
  58. 57 tar -xvf home.tgz -C ../archive/
  59. 58 ls ../archive/
  60. 59 tree ../archive/
  61. 60 history
  62. 61 nano easy
  63. 62 vimtutor
  64. 63 vim newfile
  65. 64 less /var/log/messages
  66. 65 more /var/log/messages
  67. 66 head /etc/passwd
  68. 67 head -5 /etc/passwd
  69. 68 head -5 /etc/passwd | tail -2
  70. 69 cat /var/log/messages
  71. 70 cat /var/log/messages | less
  72. 71 ls
  73. 72 cat newfile
  74. 73 tac newfile
  75. 74 grep lisa /etc/*
  76. 75 grep lisa /etc/* 2>/dev/null
  77. 76 grep -l lisa /etc/* 2>/dev/null
  78. 77 ps aux | grep ssh
  79. 78 ps aux | grep ssh | grep -v grep
  80. 79 grep -i allow /etc/ssh/sshd_config
  81. 80 grep -i -A 5 allow /etc/ssh/sshd_config
  82. 81 grep -i -A 5 -B 5 allow /etc/ssh/sshd_config
  83. 82 grep -i -C 5 allow /etc/ssh/sshd_config
  84. 83 cd
  85. 84 vim simpletextfile
  86. 85 grep 'anna' simpletextfile
  87. 86 grep '^anna' simpletextfile
  88. 87 grep 'anna$' simpletextfile
  89. 88 grep '^anna$' simpletextfile
  90. 89 vim simpletextfile
  91. 90 grep '^$' simpletextfile
  92. 91 vim simpletextfile
  93. 92 grep '^anna\b' simpletextfile
  94. 93 grep 'b.*t' simpletextfile
  95. 94 vim simpletextfile
  96. 95 grep 'b.*t' simpletextfile
  97. 96 grep 'b.+t' simpletextfile
  98. 97 grep -E 'b.+t' simpletextfile
  99. 98 grep -E 'b.?t' simpletextfile
  100. 99 vim simpletextfile
  101. 100 grep 'b.*t' simpletextfile
  102. 101 grep 'b*t' simpletextfile
  103. 102 man semanage-fcontext
  104. 103 grep 'bo\{7\}t' simpletextfile
  105. 104 grep 'bo\{6\}t' simpletextfile
  106. 105 history
  107. 106 cat simpletextfile
  108. 107 cut /etc/passwd
  109. 108 cut -f 1 /etc/passwd
  110. 109 cut -f 1 -d : /etc/passwd
  111. 110 cut -f 1 -d : /etc/passwd | sort
  112. 111 echo hello | tr [:lower:] [:upper:]
  113. 112 echo hello | tr [a-z] [A-Z]
  114. 113 sed -n 5p /etc/passwd
  115. 114 grep old *
  116. 115 cd /home/student/
  117. 116 grep old *
  118. 117 cd
  119. 118 vim afile
  120. 119 sed -i 's/old/new/g' afile
  121. 120 cat afile
  122. 121 sed -i -e '2d' afile
  123. 122 cat afile
  124. 123 echo hello >file{1..10}.txt
  125. 124 for i in file{1..10}; do echo hello > $i; done
  126. 125 cat file9
  127. 126 cat file4
  128. 127 for i in file*; do sed -i 's/hello/goedemiddag/' $i; done
  129. 128 cat file3
  130. 129 akw -F : '{ print $4 }' /etc/passwd
  131. 130 awk -F : '{ print $4 }' /etc/passwd
  132. 131 awk -F : '/lisa/ { print $4 }' /etc/passwd
  133. 132 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  134. 133 awk -F : '$3 < 999 { print $1 }' /etc/passwd
  135. 134 ls
  136. 135 ls > outfile
  137. 136 cat outfile
  138. 137 whoami > outfile
  139. 138 cat outfile
  140. 139 ls -l >> outfile
  141. 140 cat outfile
  142. 141 grep root /etc/*
  143. 142 grep root /etc/* 2>/dev/null
  144. 143 grep root /etc/* 2>/dev/null > results.out
  145. 144 less results.out
  146. 145 grep root /etc/* 2> errors.txt > results.out
  147. 146 less errors.txt
  148. 147 grep root /etc/* &> all.txt
  149. 148 less all.txt
  150. 149 ps aux | tee psfile | grep ssh
  151. 150 ps aux | tee psfile | grep ssh > out.txt
  152. 151 akw -F : '{ print $4 }' /etc/passwd
  153. 152 whoami > outfile
  154. 153 grep root /etc/* 2>/dev/null
  155. 154 useradd anna
  156. 155 echo password | passwd --stdin anna
  157. 156 history
  158. 157 history -d 151
  159. 158 touch kgkgiugugfuiygfuifguyfuyfuytfuyfytrsrtdyfghhjikuhik
  160. 159 rm kgkgiugugfuiygfuifguyfuyfuytfuyfytrsrtdyfghhjikuhik
  161. 160 env
  162. 161 echo $DEBUGINFOD_URLS
  163. 162 ip addr show
  164. 163 dnf install bash-completion
  165. 164 echo color=red
  166. 165 color=red
  167. 166 echo $color
  168. 167 alias
  169. 168 ps aux | grep ssh
  170. 169 alias sander='echo hello there'
  171. 170 sander
  172. 171 vim /etc/bashrc
  173. 172 sleep 3600
  174. 173 vim /etc/profile
  175. 174 cd /etc/profile.d/
  176. 175 ls
  177. 176 cd
  178. 177 ls -a
  179. 178 history
  180. 179 cd /etc/profile.d/
  181. 180 vim all.sh
  182. 181 jobs
  183. 182 cd
  184. 183 sleep infinity
  185. 184 bg
  186. 185 sleep 1000 &
  187. 186 jobs
  188. 187 fg 1
  189. 188 jobs
  190. 189 fg
  191. 190 while true; do true; done &
  192. 191 top
  193. 192 dd if=/dev/zero of=/dev/null &
  194. 193 top
  195. 194 ps aux | grep dd
  196. 195 kill 47125
  197. 196 kill -9 47125
  198. 197 dnf install nmap
  199. 198 dnf search http
  200. 199 useradd linda
  201. 200 passwd linda
  202. 201 ls -l /usr/local/bin/countdown
  203. 202 groupadd sales
  204. 203 useradd -G sales anna
  205. 204 usermod -G sales anna
  206. 205 usermod -G sales linda
  207. 206 id anna
  208. 207 mkdir /data/sales
  209. 208 mkdir -p /data/sales
  210. 209 ls -ld /data/sales
  211. 210 chgrp sales /data/sales
  212. 211 chmod 770 /data/sales
  213. 212 ls -ld /data/sales
  214. 213 ip addr show
  215. 214 ip a
  216. 215 ping 192.168.29.155
  217. 216 lsblk
  218. 217 mount | grep tmp
  219. 218 systemctl cat tmp.mount
  220. 219 mkdir /test
  221. 220 mount tmpfs /test
  222. 221 systemctl cat tmp.mount
  223. 222 mount -o nodev tmpfs /test
  224. 223 lsblk
  225. 224 umount /dev/sr0
  226. 225 lsblk
  227. 226 mount /dev/sr0 /mnt
  228. 227 cd /mnt
  229. 228 ls
  230. 229 umount /mnt
  231. 230 lsof /mnt
  232. 231 cd
  233. 232 lsof /mnt
  234. 233 umount /mnt
  235. 234 journalctl
  236. 235 cd /var/log
  237. 236 ls -l
  238. 237 cd
  239. 238 history
  240.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement