sandervanvugt

linfun aug23

Aug 10th, 2023
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.54 KB | None | 0 0
  1. [student@centos ~]$ history
  2. 1 cat /etc/os-release
  3. 2 exit
  4. 3 vim countdown
  5. 4 countdown
  6. 5 echo $PATH
  7. 6 ./countdown
  8. 7 ls -l countdown
  9. 8 chmod +x countdown
  10. 9 ./countdown
  11. 10 cat countdown
  12. 11 history
  13. 12 cat countdown
  14. 13 whoami
  15. 14 ls -l /root
  16. 15 sudo ls -l /root
  17. 16 rm -rf /root/*
  18. 17 id
  19. 18 cat /etc/group
  20. 19 cut -d : -f 1 /etc/group
  21. 20 tail -5 /etc/group
  22. 21 cut -d : -f 1 /etc/group
  23. 22 dnf install openssh
  24. 23 sudo dnf install openssh
  25. 24 sudo systemctl status sshd
  26. 25 ip a
  27. 27 history
  28. 28 ssh localhost
  29. 29 history
  30. 30 ls
  31. 31 LS
  32. 32 ls --help
  33. 33 ls --help | less
  34. 34 ls -lrt
  35. 35 whoami
  36. 36 whoami --help
  37. 37 id -un
  38. 38 id
  39. 39 hostname
  40. 40 hostnamectl --help
  41. 41 hostnamectl status
  42. 42 hostnamectl hostname centos.example.com
  43. 43 hostnamectl status
  44. 44 date
  45. 45 date +%d-%m-%y
  46. 46 timedatactl
  47. 47 timedatectl
  48. 48 timedatectl --help
  49. 49 timedatectl show
  50. 50 timedatectl status
  51. 51 uname
  52. 52 uname --help
  53. 53 uname -r
  54. 54 uname -a
  55. 55 hostnamectl status
  56. 56 history
  57. 57 passwd
  58. 58 sudo passwd root
  59. 59 touch hello
  60. 60 ls -lrt
  61. 61 touch /hello
  62. 62 touch countdown
  63. 63 ls -l
  64. 64 last
  65. 65 man passwd
  66. 66 sudo passwd bob
  67. 67 echo $?
  68. 68 man passwd
  69. 69 passwd --help
  70. 70 man passwd
  71. 71 man man
  72. 72 man lvcreate
  73. 73 man -k user
  74. 74 man -k user |wc
  75. 75 man -k user | grep 8
  76. 76 man -k sander
  77. 77 man man
  78. 78 man apropos
  79. 79 man mandb
  80. 80 sudo mandb
  81. 81 man ls
  82. 82 pinfo '(coreutils) ls invocation'
  83. 83 cd /usr/share/doc
  84. 84 ls
  85. 85 cd passwd/
  86. 86 ls
  87. 87 cd ../PackageKit/
  88. 88 ls
  89. 89 exit
  90. 90 ./countdown 12
  91. 91 ./countdown 15
  92. 92 history
  93. 93 man -k hostname
  94. 94 man man
  95. 95 man hostnamectl
  96. 96 lvcreate --help
  97. 97 lvcreate --help | less
  98. 98 pwd
  99. 99 ls
  100. 100 ls -a
  101. 101 ls -ld /etc
  102. 102 ls -l /etc
  103. 103 ls -l /etc/sudo*
  104. 104 sudo ls -l /etc/sudo*
  105. 105 sudo ls -ld /etc/sudo*
  106. 106 cd /etc
  107. 107 ls a
  108. 108 ls a*
  109. 109 ls -d a*
  110. 110 ls -d a?[np]*
  111. 111 cd
  112. 112 pwd
  113. 113 cd /etc
  114. 114 mkdir new
  115. 115 cd /tmp
  116. 116 mkdir new
  117. 117 rmdir
  118. 118 rmdir new
  119. 119 mkdir new
  120. 120 touch new/file
  121. 121 ls new
  122. 122 rmdir new
  123. 123 rm -rf new/
  124. 124 touch new/file
  125. 125 mkdir new
  126. 126 touch new/file
  127. 127 man hier
  128. 128 pwd
  129. 129 cd home
  130. 130 cd /home
  131. 131 pwd
  132. 132 touch hello
  133. 133 ls
  134. 134 cd
  135. 135 touch hello
  136. 136 cd /var
  137. 137 ls -l /var/log/messages
  138. 138 ls -l log/messages
  139. 139 cd tmp
  140. 140 pwd
  141. 141 ls -l log/messages
  142. 142 ls -l ../log/messages
  143. 143 ls -l ../../var/log/messages
  144. 144 pwd
  145. 145 cp /var/log/messages newdir
  146. 146 sudo cp /var/log/messages newdir
  147. 147 ls -ld newdir
  148. 148 sudo rm newdir
  149. 149 sudo cp /var/log/messages newdir/
  150. 150 cp -a ~/.* .
  151. 151 ls -a
  152. 152 cp /etc/hosts .
  153. 153 ls
  154. 154 mv hosts whatever
  155. 155 ls
  156. 156 mv whatever ~/hosts
  157. 157 ls
  158. 158 ls ~
  159. 159 history
  160. 160 sudo poweroff
  161. 161 ls
  162. 162 ls -il countdown
  163. 163 ln countdown teller
  164. 164 ls -il countdown teller
  165. 165 ln teller compteur
  166. 166 ls -il countdown teller compteur
  167. 167 echo "# this is comment" >> teller
  168. 168 ls -il countdown teller compteur
  169. 169 rm countdown
  170. 170 ls -il countdown teller compteur
  171. 171 ln teller countdown
  172. 172 ln -s teller symcounter
  173. 173 ls -il countdown teller compteur symcounter
  174. 174 cat symcounter
  175. 175 rm teller
  176. 176 ls -il countdown teller compteur symcounter
  177. 177 cat symcounter
  178. 178 sudo ln /boot/vmlinuz-5.14.0-319.el9.x86_64 kernel
  179. 179 lsblk
  180. 180 sudo find / -name "hosts"
  181. 181 sudo find / -name "hosts" 2>/dev/null
  182. 182 sudo find / -name "*hosts*" 2>/dev/null
  183. 183 sudo useradd linda
  184. 184 sudo find / -user "linda"
  185. 185 sudo find / -type f -user "linda"
  186. 186 history
  187. 187 sudo find / -user "linda"
  188. 188 sudo find / -type f -user "linda"
  189. 189 sudo mkdir /root/linda; sudo find / -type f -user "linda" -exec cp {} /root/linda/ \;
  190. 190 sudo ls /root/linda
  191. 191 sudo ls -a /root/linda
  192. 192 history
  193. 193 sudo tar -cvf my_archive.tar /etc
  194. 194 ls -l
  195. 195 sudo tar -czvf my_archive.tar.gz /etc
  196. 196 ls -l
  197. 197* sudo tar -cjvf my_archive.tar.bz2 /etc
  198. 198 ls -l
  199. 199 tar -tvf my_archive.tar.gz
  200. 200 tar -xvf my_archive.tar.gz
  201. 201 ls
  202. 202 tree etc
  203. 203 history
  204. 204 ls -l
  205. 205 sudo tar -cjvf my_archive.tar.bz2 /etc
  206. 206 history
  207. 207 ls -l
  208. 208 file my_archive.tar.gz
  209. 209 history
  210. 210 sudo tar -czvf my_archive.tar.gz /etc
  211. 211 ls -l
  212. 212 file my_archive.tar.gz
  213. 213 mv my_archive.tar my_archive
  214. 214 file my_archive
  215. 215 history
  216. 216 ls
  217. 217 history
  218. 218 ls -l /etc
  219. 219 ls -l /home
  220. 220 history
  221. 221 mkdir /tmp/files
  222. 222 cd /tmp/files
  223. 223 mkdir pictures photos videos
  224. 224 mkdir -p /tmp/newfiles/{pictures,photos,videos}
  225. 225 tree /tmp/newfiles/
  226. 226 ls
  227. 227 cp /etc/[a-c]* .
  228. 228 ls
  229. 229 mv c* videos/
  230. 230 mv * photos/
  231. 231 ls
  232. 232 ls photos/
  233. 233 mv photos/[vp]* .
  234. 234 ls
  235. 235 man find
  236. 236 find /etc -size -1000c
  237. 237 find /etc -size -1000c -exec ls -l {} \;
  238. 238 find /etc -size -1000 c -exec ls -l {} \;
  239. 239 ls -l /etc/18.txt
  240. 240 ls -l /etc/brltty/Input/bd/18.txt
  241. 241 man find
  242. 242 find /etc -size -1000c -exec cp {} /tmp/files/pictures/ \;
  243. 243 ln -s /var .
  244. 244 ls
  245. 245 tar -czvf homes.tgz /home
  246. 246 sudo tar -czvf homes.tgz /home
  247. 247 mkdir ../archive
  248. 248 tar -xvf homes.tgz -C ../archive/
  249. 249 ls ../archive/home/
  250. 250 history
  251. 251 cd videos/
  252. 252 ls
  253. 253 rm *
  254. 254 dd if=/dev/zero of=smallfile1 bs=1 count=500
  255. 255 dd if=/dev/zero of=smallfile2 bs=1 count=600
  256. 256 dd if=/dev/zero of=bigfile2 bs=1 count=6000
  257. 257 dd if=/dev/zero of=bigfile1 bs=1 count=5000
  258. 258 ls -l
  259. 259 find . -size -1000c
  260. 260 find . -size +1000c
  261. 261 history
  262. 262 cd
  263. 263 vim
  264. 264 vimtutor
  265. 265 nano vicmd
  266. 266 sudo less /var/log/messages
  267. 267*
  268. 268 ps aux | head
  269. 269 ps aux | head -5
  270. 270 head -5 /etc/passwd
  271. 271 head -5 /etc/passwd | tail -1
  272. 272 cat vicmd
  273. 273 tac vicmd
  274. 274 grep file *
  275. 275 cd /etc
  276. 276 grep linda *
  277. 277 grep linda * 2>/dev/null
  278. 278 grep -l linda * 2>/dev/null
  279. 279 grep -il linda * 2>/dev/null
  280. 280 sudo grep -A5 -i 'root' /etc/ssh/sshd_config
  281. 281 sudo grep -B5 -i 'root' /etc/ssh/sshd_config
  282. 282 sudo grep -C5 -i 'root' /etc/ssh/sshd_config
  283. 283 ps aux | grep ssh
  284. 284 ps aux | grep ssh | grep -v grep
  285. 285 history
  286. 286 cd
  287. 287 vim regexfile
  288. 288 grep '^l' regexfile
  289. 289 grep 'anna$' regexfile
  290. 290 vim regexfile
  291. 291 grep 'lea\b' regexfile
  292. 292 grep 'bo*t' regexfile
  293. 293 grep 'b.*t' regexfile
  294. 294 vim regexfile
  295. 295 grep 'b.*t' regexfile
  296. 296 grep '^b.*t$' regexfile
  297. 297 grep '^b.+t$' regexfile
  298. 298 grep -E '^b.+t$' regexfile
  299. 299 grep -E '^b.?t$' regexfile
  300. 300 grep 'bo\{3\}t' regexfile
  301. 301 grep '^$' regexfile
  302. 302 grep '^.$' regexfile
  303. 303 grep '^.*$' regexfile
  304. 304 grep '.*' regexfile
  305. 305 history
  306. 306 cat regexfile
  307. 307 tail -5 /etc/passwd
  308. 308 cut -d : -f 2 /etc/passwd
  309. 309 tail -5 /etc/passwd
  310. 310 cut -d : -f 3 /etc/passwd | sort | less
  311. 311 cut -d : -f 3 /etc/passwd | sort -n | less
  312. 312 echo hello | tr [:a-z:] [:A-Z:]
  313. 313 echo hello | tr [:lower:] [:upper:]
  314. 314 echo hello | tr [a-z] [A-Z]
  315. 315 echo hello | tr [a-k] [l-z]
  316. 316 sed -n 5p /etc/passwd
  317. 317 sed -i s/old/new/g regexfile
  318. 318 man sed
  319. 319 for i in {1..100}; do echo hello > file${i}; done
  320. 320 ls
  321. 321 cat file60
  322. 322 for i file*; do sed -i 's/hello/goodbey/' ${i}; done
  323. 323 for i file* ; do sed -i 's/hello/goodbey/' ${i}; done
  324. 324 for i * ; do sed -i 's/hello/goodbey/' ${i}; done
  325. 325 for i in file* ; do sed -i 's/hello/goodbey/' ${i}; done
  326. 326 cat file81
  327. 327 awk -F : '{ print $4 }' /etc/passwd
  328. 328 awk -F : '/linda/ { print $4 }' /etc/passwd
  329. 329 awk -F : '$4 > 999 { print $1 }' /etc/passwd
  330. 330 awk -F : '$4 < 999 { print $1 }' /etc/passwd
  331. 331 ls > example
  332. 332 cat example
  333. 333 who > example
  334. 334 cat example
  335. 335 id >> example
  336. 336 grep root /etc/*
  337. 337 grep root /etc/* 2>/dev/null
  338. 338 grep root /etc/* &>/dev/null
  339. 339 sort < /etc/service
  340. 340 sort < /etc/services
  341. 341 sort /etc/services
  342. 342 history
  343. 343 sudo sh -c "echo password | passwd --stdin linda"
  344. 344 history
  345. 345 history -d 342
  346. 346 history
  347. 347 touch ihiuihiguiguygyufuyftyftyfytdftydftyddftyfyuguiguihuhigyufuyufytfuytfuty
  348. 348 rm ihiuihiguiguygyufuyftyftyfytdftydftyddftyfyuguiguihuhigyufuyufytfuytfuty
  349. 349 echo $HISTSIZE
  350. 350 sudo dnf install bash-completion
  351. 351 env
  352. 352 echo $PATH
  353. 353 alias
  354. 354 ps aux | grep ssh
  355. 355 alias
  356. 356 alias sander='echo hello'
  357. 357 sander
  358. 358 sleep infinity
  359. 359 vim /etc/profile
  360. 360 cd /etc/profile.d/
  361. 361 ls
  362. 362 less colorls.sh
  363. 363 vim /etc/bashrc
  364. 364 cd
  365. 365 ls -a
  366. 366 vim .bashrc
  367. 367 bash
  368. 368 vim .bash_logout
  369. 369 sudo dd if=/dev/zero of=/dev/null
  370. 370 bg
  371. 371 sudo top
  372. 372 history
  373. 373 sleep 1000
  374. 374 bg
  375. 375 sleep 1000 &
  376. 376 ps aux | grep 11319
  377. 377 jobs
  378. 378 fg 1
  379. 379 kill 11319
  380. 380 ps aux | less
  381. 381 kill 791
  382. 382 ps faux | less
  383. 383 ps -e -o pid,args --forest
  384. 384 ps aux --sort pmem | less
  385. 385 top
  386. 386 sudo dd if=/dev/zero of=/dev/null &
  387. 387 top
  388. 388 sudo -i
  389. 389 sudo dnf list selinux*
  390. 390 sudo dnf install selinux-policy-doc
  391. 391 sudo dnf search nmap
  392. 392 sudo dnf install nmap
  393. 393 touch newfile
  394. 394 ls -l newfile
  395. 395 id
  396. 396 sudo id linda
  397. 397 sudo usermod -aG wheel linda
  398. 398 sudo groupadd students
  399. 399 sudo usermod -aG students linda
  400. 400 sudo mkdir -p /data/students
  401. 401 ls -ld /data/students
  402. 402 sudo chgrp students /data/students
  403. 403 ls -ld /data/students
  404. 404 sudo chmod 770 /data/students
  405. 405 ls -ld /data/students
  406. 406 ip a
  407. 407 echo "echo hello world" > myscript
  408. 408 ./myscript
  409. 409 chmod +x myscript
  410. 410 ls -l myscript
  411. 411 ./myscript
  412. 412 ip route show
  413. 413 cat /etc/resolv.conf
  414. 414 man ifconfig
  415. 415 lsblk
  416. 416 sudo mount /dev/sdb4 /mnt
  417. 417 lsblk
  418. 418 history
  419.  
Advertisement
Add Comment
Please, Sign In to add comment