Advertisement
sandervanvugt

linfun june22 day2

Jun 8th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.85 KB | None | 0 0
  1. [root@linfun log]# history
  2. 1 #cp -R /tmp/ .
  3. 2 ls
  4. 3 cp -R /tmp/ .
  5. 4 ls
  6. 5 ls tmp/
  7. 6 rm -rf tmp/
  8. 7 cp -R /tmp .
  9. 8 ls
  10. 9 cp /etc/hosts somedir/
  11. 10 cp /etc/hosts somedir
  12. 11 ls -l
  13. 12 ls
  14. 13 mv somedir myfile
  15. 14 ls -l
  16. 15 ls -il /etc/hosts
  17. 16 ln /etc/hosts hardhosts1
  18. 17 ln /etc/hosts hardhosts2
  19. 18 ls -il /etc/hosts hardhosts1 hardhosts2
  20. 19 echo hello >> /etc/hosts
  21. 20 ls -il /etc/hosts hardhosts1 hardhosts2
  22. 21 ln /etc etc
  23. 22 ln -s /etc etc
  24. 23 ls
  25. 24 ls -l
  26. 25 ls /boot
  27. 26 ln /boot/vmlinuz-5.14.0-47.el9.x86_64 kernel
  28. 27 ln -s /boot/vmlinuz-5.14.0-47.el9.x86_64 kernel
  29. 28 ls
  30. 29 ls -l
  31. 30 cd /
  32. 31 ls -l
  33. 32 countdown 1
  34. 33 cd
  35. 34 ls -l\
  36. 35 ls -l
  37. 36 ln -s hardhosts1 symhost
  38. 37 ls -il hardhosts1 symhost
  39. 38 rm hardhosts1
  40. 39 ls -il hardhosts1 symhost hardhosts2
  41. 40 cat symhost
  42. 41 lsblk
  43. 42 findmnt
  44. 43 find / -name "hosts"
  45. 44 find / -name "*hosts*"
  46. 45 useradd linda
  47. 46 find / -user linda
  48. 47 su - linda
  49. 48 find / -user linda 2 > /dev/null
  50. 49 find / -user linda 2> /dev/null
  51. 50 find / -size +1G
  52. 51 find / -size +1G 2>/dev/null
  53. 52 mkdir /root/linda; find / -user linda -exec cp {} /root/linda \;
  54. 53 ls linda/
  55. 54 tar -cvf myarchive.tar /home
  56. 55 ls -l
  57. 56 ls
  58. 57 tar -tvf myarchive.tar
  59. 58 tar -xvf myarchive.tar
  60. 59 ls
  61. 60 tree home
  62. 61 tar -czvf myarchive.tar.gz /home
  63. 62 tar -cjvf myarchive.tar.bz2 /home
  64. 63 tar -cJvf myarchive.tar.xz /home
  65. 64 ls -l myarch*
  66. 65 history
  67. 66 countdown 1
  68. 67 countdown 15
  69. 68 mkdir -p /tmp/files/pictures /tmp/files/photos /tmp/files/videos
  70. 69 cp /etc/[a-c]* /tmp/files/
  71. 70 cd /tmp/files/
  72. 71 ls
  73. 72 mv [ab]* photos/
  74. 73 mv c* videos/
  75. 74 tree
  76. 75 man find
  77. 76 find /etc -size -1000c
  78. 77 find /etc -size -1000c -exec cp {} pictures/ \;
  79. 78 ls pictures/
  80. 79 pwd
  81. 80 ln -s /var var
  82. 81 ls
  83. 82 tar -czvf homes.tgz /home/
  84. 83 cd ..
  85. 84 mkdir archive
  86. 85 cd archive/
  87. 86 tar -xvf ../files/homes.tgz
  88. 87 ls
  89. 88 tree
  90. 89 history
  91. 90 cd
  92. 91 which countdown
  93. 92 nano /bin/countdown
  94. 93 ls -l $(which vi) $(which vim)
  95. 94 vimtutor
  96. 95 vim myfile
  97. 96 ls -l $(which vi)
  98. 97 file /bin/vi
  99. 98 file /bin/vim
  100. 99 vim /bin/vi
  101. 100 ls -l /usr/libexec/vi
  102. 101 vim myfile
  103. 102 less /etc/passwd
  104. 103 more /etc/passwd
  105. 104 head /etc/passwd
  106. 105 head /etc/passwd -5
  107. 106 head -5 /etc/passwd
  108. 107 tail -5 /etc/passwd
  109. 108 tail -f /var/log/messages
  110. 109 cat /etc/passswd
  111. 110 cat /etc/passwd
  112. 111 tac /etc/passwd
  113. 112 cd /etc
  114. 113 grep linda *
  115. 114 grep linda * 2> /dev/null
  116. 115 ps aux
  117. 116 ps aux | grep ssh
  118. 117 ps aux | grep ssh | grep -v grep
  119. 118 ps aux | grep SSH
  120. 119 ps aux | grep -i SSH
  121. 120 grep RootLogin /etc/ssh/sshd_config
  122. 121 grep -A 5 -B 5 RootLogin /etc/ssh/sshd_config
  123. 122 grep -l root * 2>/dev/null
  124. 123 grep -lR root * 2>/dev/null
  125. 124 cd
  126. 125 vim texfile
  127. 126 grep '^l' texfile
  128. 127 grep '^a' texfile
  129. 128 grep 'a' texfile
  130. 129 grep 'a$' texfile
  131. 130 vim texfile
  132. 131 grep '^lea\b' texfile
  133. 132 grep '^lea' texfile
  134. 133 vim texfile
  135. 134 grep 'b.t' texfile
  136. 135 vim texfile
  137. 136 grep 'b.t' texfile
  138. 137 grep 'b.*t' texfile
  139. 138 grep 'bo+t' texfile
  140. 139 grep -E 'bo+t' texfile
  141. 140 grep -E 'bo*t' texfile
  142. 141 grep -E 'bo?t' texfile
  143. 142 grep -E 'bo\{3\}t' texfile
  144. 143 grep 'bo\{3\}t' texfile
  145. 144 history
  146. 145 man semanage-fcontext
  147. 146 countdown 13
  148. 147 history
  149. 148 cut -f 1 /etc/passwd
  150. 149 cut -f 1 -d : /etc/passwd
  151. 150 cut -f 1 -d : /etc/passwd | sort
  152. 151 cut -f 3 -d : /etc/passwd | sort
  153. 152 cut -f 3 -d : /etc/passwd | sort -n
  154. 153 echo hello | tr a-z A-Z
  155. 154 echo hello | tr [:lower:] [:upper:]
  156. 155 echo hello | tr a-k l-z
  157. 156 sed -n 5p /etc/passwd
  158. 157 sed -i s/bananna/apple/ texfile
  159. 158 grep apple texfile
  160. 159 cat texfile
  161. 160 sed -i -e '2d' texfile
  162. 161 cat texfile
  163. 162 vim a.conf
  164. 163 vim b.conf
  165. 164 vim c.conf
  166. 165 for i in *conf; do sed -i 's/apple/orange/g' $i; done
  167. 166 cat c.conf
  168. 167 awk -F : '{ print $4 }' /etc/passwd
  169. 168 awk -F '/linda/ { print $4 }' /etc/passwd
  170. 169 awk -F : '/linda/ { print $4 }' /etc/passwd
  171. 170 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  172. 171 vim /etc/passwd
  173. 172 history
  174. 173 sort < /etc/services
  175. 174 sort /etc/services
  176. 175 ls > lsfile
  177. 176 cat lsfile
  178. 177 who > lsfile
  179. 178 cat lsfile
  180. 179 ls >> lsfile
  181. 180 cat lsfile
  182. 181 grep -R oot /proc 2>/dev/null
  183. 182 grep -R oot /etc &> myfile
  184. 183 ps aux | tee psfile | grep ssh
  185. 184 less psfile
  186. 185 history
  187. 186 tail /etc/shadow
  188. 187 echo password | passwd --stdin linda
  189. 188 tail /etc/shadow
  190. 189 history
  191. 190 #history -d 187
  192. 191 cat c.conf
  193. 192 sort /etc/services
  194. 193 grep -R oot /etc &> myfile
  195. 194 users
  196. 195 dnf install bash-completion
  197. 196 #apt install bash-completion
  198. 197 env
  199. 198 echo $PATH
  200. 199 echo $HISTSIZE
  201. 200 echo $HISTFILESIZE
  202. 201 export HISTFILESIZE=5000
  203. 202 vim /bin/countdown
  204. 203 countdown 1
  205. 204 countdown 12
  206. 205 visudo
  207. 206 su - linda
  208. 207 grep linda /etc/sudoers
  209. 208 dd if=/dev/zero of=/dev/null &
  210. 209 top
  211. 210 dd if=/dev/zero of=/dev/null &
  212. 211 ps aux | grep dd
  213. 212 kill -9 42800
  214. 213 ls -l $(which yum)
  215. 214 ls -l $(which dnf)
  216. 215 dnf repolist
  217. 216 dnf search nmap
  218. 217 dnf install nmap
  219. 218 dnf remove bash
  220. 219 dnf provides */Containerfile
  221. 220 dnf install buildah-tests-1
  222. 221 dnf install buildah-tests
  223. 222 groupadd sales
  224. 223 id linda
  225. 224 usermod -aG sales linda
  226. 225 id linda
  227. 226 usermod -G wheel linda
  228. 227 id linda
  229. 228 usermod -aG sales linda
  230. 229 id linda
  231. 230 su - linda
  232. 231 ls -l /etc/hosts
  233. 232 id linda
  234. 233 mkdir -p /data/sales
  235. 234 cd /data
  236. 235 ls -l
  237. 236 chown linda:sales sales
  238. 237 ls -l
  239. 238 chmod g+w sales
  240. 239 ls -l
  241. 240 chmod 770 sales
  242. 241 ls -l
  243. 242 useradd -G sales jenny
  244. 243 su - jenny
  245. 244 useradd -G sales -m lisa
  246. 245 cd /home/lisa/
  247. 246 touch rootfile
  248. 247 su - lisa
  249. 248 systemctl status NetworkManager
  250. 249 cd
  251. 250 ip addr
  252. 251 ifconfig
  253. 252 ip addr add dev ens33 10.0.0.10/24
  254. 253 ip a
  255. 254 ifconfig
  256. 255 man ifconfig
  257. 256 ip route show
  258. 257 ping nu.nl
  259. 258 lslbk
  260. 259 lsblk
  261. 260 ls /dev/sd*
  262. 261 lsblk
  263. 262 umount /dev/sdb1
  264. 263 lsblk
  265. 264 mount /dev/sdb1 /mnt
  266. 265 ls /mnt
  267. 266 findmnt
  268. 267 umount /mnt
  269. 268 journalctl
  270. 269 cd /var/log
  271. 270 ls -lrt
  272. 271 tail -f messages
  273. 272 history
  274.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement