Advertisement
sandervanvugt

linden day2 june21

Jun 29th, 2021
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.55 KB | None | 0 0
  1. [root@linfun data]# history
  2. 1 exit
  3. 2 cd /var/log
  4. 3 ls
  5. 4 ls -l
  6. 5 tail messages
  7. 6 pwd
  8. 7 cd ..
  9. 8 pwd
  10. 9 tail -1 log/messages
  11. 10 tail -1 ./log/messages
  12. 11 ls
  13. 12 cd gopher/
  14. 13 pwd
  15. 14 ls
  16. 15 tail -1 ../log/messages
  17. 16 tail -1 ../../var/log/messages
  18. 17 tail -1 /var/log/messages
  19. 18 cp /etc/hosts .
  20. 19 ls
  21. 20 cp /etc/hosts mydir/
  22. 21 cp /etc/hosts mydir
  23. 22 ls
  24. 23 cat /etc/hosts mydir
  25. 24 cp /etc/passwd mydir
  26. 25 tail -1 mydir
  27. 26 cd
  28. 27 ls
  29. 28 ls -a
  30. 29 cp -a .* /tmp/rootfiles/
  31. 30 mkdir /tmp/rootfiles; cp -a .* /tmp/rootfiles/
  32. 31 mkdir /tmp/rootfiles; cp -a ~/.* /tmp/rootfiles/
  33. 32 rm -rf /tmp/rootfiles/*
  34. 33 mkdir /tmp/rootfiles; cp -a ~/.* /tmp/rootfiles/
  35. 34 cd /tmp/rootfiles/
  36. 35 ls
  37. 36 ls -a
  38. 37 cd ..
  39. 38 rm -rf rootfiles/
  40. 39 history
  41. 40 cd -
  42. 41 cd
  43. 42 mkdir /tmp/rootfiles; cp -a ~/.* /tmp/rootfiles/
  44. 43 ls /tmp/rootfiles/
  45. 44 ls -a
  46. 45 cp -R /etc /tmp/rootfiles/
  47. 46 ls
  48. 47 cp /etc/hosts .
  49. 48 ls -l
  50. 49 mv hosts whatever
  51. 50 ls
  52. 51 mv whatever /tmp/rootfiles/
  53. 52 ls -il /etc/hosts
  54. 53 ln /etc/hosts /root/hosts
  55. 54 ls -il /etc/hosts /root/hosts
  56. 55 echo hello >> /etc/hosts
  57. 56 ls -il /etc/hosts /root/hosts
  58. 57 ln -s /root/hosts /root/symhosts
  59. 58 ls -il /etc/hosts /root/hosts /root/symhosts
  60. 59 cat /root/symhosts
  61. 60 ln /etc/hosts /boot/hosts
  62. 61 rm /root/hosts
  63. 62 ls -il /etc/hosts /root/hosts /root/symhosts
  64. 63 cat /root/symhosts
  65. 64 cd /
  66. 65 ls -l
  67. 66 cd
  68. 67 history
  69. 68 lsblk
  70. 69 find / -name "hosts"
  71. 70 find / -name "*hosts*"
  72. 71 find / -user "linda"
  73. 72 find / -user "linda" 2>/dev/null
  74. 73 find / -size +2G
  75. 74 #mkdir /root/linda; find / -user linda -exec cp {} /root/linda \;
  76. 75 echo $PATH
  77. 76 echo \$PATH
  78. 77 mkdir /root/linda; find / -user linda -exec cp {} /root/linda \;
  79. 78 history
  80. 79 #find / -user linda -exec cp {} /root/linda \;
  81. 80 tar cvf my_archive.tar /home /etc
  82. 81 ls -l
  83. 82 tar -czvf my_archive /home /etc
  84. 83 ls -l
  85. 84 file my_archive
  86. 85 tar -cjvf my_archive.tar.bz2 /home /etc
  87. 86 ls -l
  88. 87 time tar -cJvf my_archive.tar.bz2 /home /etc
  89. 88 time tar -cjvf my_archive.tar.bz2 /home /etc
  90. 89 ls -l
  91. 90 time tar -cJvf my_archive.tar.xz /home /etc &
  92. 91 fg
  93. 92 time tar -cJvf my_archive.tar.xz /home /etc >/dev/null &
  94. 93 file my_archive.tar.xz
  95. 94 file my_archive.tar.bz2
  96. 95 ls -l
  97. 96 tar -tvf my_archive.tar
  98. 97 mkdir /somewhereelse
  99. 98 tar -xvf my_archive.tar -C /somewhereelse/
  100. 99 ls /somewhereelse/
  101. 100 echo $PATH
  102. 101 find / -name countdown
  103. 102 ln /usr/local/bin/countdown /usr/local/sbin/
  104. 103 countdown 12
  105. 104 nano
  106. 105 visudo
  107. 106 which nano
  108. 107 export EDITOR=/bin/nano
  109. 108 which nano
  110. 109 visudo
  111. 110 vimtutor
  112. 111 less /var/log/messages
  113. 112 more /var/log/messages
  114. 113 head /etc/passwd
  115. 114 head -5 /etc/passwd
  116. 115 head -n 5 /etc/passwd
  117. 116 head -n 5 /etc/passwd | tail -1
  118. 117 cat /etc/hosts
  119. 118 tac /etc/hosts
  120. 119 grep lisa /etc/passwd
  121. 120 grep 'lisa' /etc/passwd
  122. 121 ps aux
  123. 122 ps aux | grep ssh
  124. 123 ps aux | grep ssh | grep -v grep
  125. 124 cd /etc
  126. 125 grep root *
  127. 126 grep root * 2>/dev/null
  128. 127 grep -l root * 2>/dev/null
  129. 128 grep -lR root * 2>/dev/null
  130. 129 cd
  131. 130 vim myusers
  132. 131 grep 'anna' myusers
  133. 132 grep '^anna' myusers
  134. 133 grep 'anna$' myusers
  135. 134 grep '^anna$' myusers
  136. 135 vim myusers
  137. 136 grep '^lea\b' myusers
  138. 137 grep 'b.*t' myfile
  139. 138 grep 'b.*t' myusers
  140. 139 grep 'b.t' myusers
  141. 140 grep 'b*t' myusers
  142. 141 grep 'bo+t' myusers
  143. 142 grep -E 'bo+t' myusers
  144. 143 grep -E 'bo?t' myusers
  145. 144 grep 'bo\{3\)t' myusers
  146. 145 grep 'bo\{3\}t' myusers
  147. 146 grep 'bo\{2\}t' myusers
  148. 147 man semanage-fcontext
  149. 148 cat /etc/passwd
  150. 149 cut -d : -f 1 /etc/passwd
  151. 150 cut -d : -f 1 /etc/passwd | sort
  152. 151 cut -d : -f 3 /etc/passwd | sort
  153. 152 cut -d : -f 3 /etc/passwd | sort -n
  154. 153 echo hello
  155. 154 echo hello | tr [a-z] [A-Z]
  156. 155 echo hello | tr [:lower:] [:upper:]
  157. 156 echo hello | tr [a-k] [l-z]
  158. 157 echo hello | tr [a-l] [m-z]
  159. 158 sed -n 5p /etc/passwd
  160. 159 sed -i s/bananna/apple/g myusers
  161. 160 cat myusers
  162. 161 sed -i -e '2d' myusers
  163. 162 echo hello 1.conf
  164. 163 echo hello 2.conf
  165. 164 echo hello > 1.conf
  166. 165 echo hello > 2.conf
  167. 166 for i in *conf; do sed -i 's/hello/break/' $i; done
  168. 167 cat 1.conf
  169. 168 awk -F : '{ print $4 }' /etc/passwd
  170. 169 awk -F : '/lisa/ { print $4 }' /etc/passwd
  171. 170 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  172. 171 tail -2 /etc/passwd
  173. 172 man awk
  174. 173 pinfo sed
  175. 174 countdown 12
  176. 175 ls > newout
  177. 176 cat newout
  178. 177 who > newout
  179. 178 cat newout
  180. 179 ls >> newout
  181. 180 cat newout
  182. 181 grep -R root /proc
  183. 182 grep -R root /proc 2>/dev/null
  184. 183 ps aux | tee psfile | grep ssh
  185. 184 cat psfile
  186. 185 history
  187. 186 ls -a
  188. 187 cat .bash_history
  189. 188 exit
  190. 189 echo $color
  191. 190 exit
  192. 191 echo $color
  193. 192 exit
  194. 193 history
  195. 194 history -d 188
  196. 195 history
  197. 196 countdown 12
  198. 197 grep -R root /proc 2>/dev/null
  199. 198 rpm -qa | grep completion
  200. 199 yum list installed | grep completion
  201. 200 nmcli connection show
  202. 201 nmcli connection edit ens33
  203. 202 ip a
  204. 203 nmcli connection add ipv4.addresses 192.168.29.111/24 ipv4.gateway 192.168.29.1 ipv4.dns 8.8.8.8
  205. 204 nmcli connection add ipv4.addresses 192.168.29.111/24 ipv4.gateway 192.168.29.1 ipv4.dns 8.8.8.8 type ethernet
  206. 205 echo $HISTFILE
  207. 206 echo $HISTFILESIZE
  208. 207 echo $PATH
  209. 208 env
  210. 209 echo $EDITOR
  211. 210 visudo
  212. 211 export EDITOR=/bin/nano
  213. 212 visudo
  214. 213 color=red
  215. 214 echo $color
  216. 215 bash
  217. 216 echo $color
  218. 217 export color=blue
  219. 218 bash
  220. 219 alias
  221. 220 unalias rm
  222. 221 alias
  223. 222 alias sander='man man'
  224. 223 sander
  225. 224 vim /etc/bashrc
  226. 225 sleep 100000
  227. 226 vim /etc/profile
  228. 227 cd /etc/profile.d/
  229. 228 ls
  230. 229 less lang.sh
  231. 230 cd
  232. 231 vim .bash_logout
  233. 232 exit
  234. 233 journalctl
  235. 234 sleep 1000
  236. 235 bg
  237. 236 jobs
  238. 237 sleep 2000 &
  239. 238 ps aux | grep 56647
  240. 239 jobs
  241. 240 fg 1
  242. 241 fg
  243. 242 sleep 2000 &
  244. 243 kill 56675
  245. 244 ps aux | grep sleep
  246. 245 while true; do true; done &
  247. 246 top
  248. 247 countdown 12
  249. 248 yum repolist
  250. 249 dnf repolist
  251. 250 dfn search nmap
  252. 251 dnf search nmap
  253. 252 dnf install nmap
  254. 253 dnf search emacs
  255. 254 dnf install emacs
  256. 255 emacs /etc/hosts
  257. 256 reset
  258. 257 which yum
  259. 258 ls -l /bin/yum
  260. 259 cd /home
  261. 260 ls -l
  262. 261 cd /etc
  263. 262 ls -l
  264. 263 useradd anna
  265. 264 useradd linda
  266. 265 groupadd sales
  267. 266 usermod -aG sales linda
  268. 267 usermod -aG sales anna
  269. 268 id anna
  270. 269 id linda
  271. 270 mkdir /data/sales
  272. 271 mkdir /data/sales -p
  273. 272 cd /data
  274. 273 ls -l
  275. 274 chgrp sales sales
  276. 275 chmod 770 sales
  277. 276 ls -l
  278. 277 su - linda
  279. 278 su - anna
  280. 279 ip addr
  281. 280 man ifconfig
  282. 281 ip
  283. 282 ip addr add dev ens33 10.0.0.10/24
  284. 283 ip a
  285. 284 ifconfig
  286. 285 ifconfig -a
  287. 286 historu
  288. 287 history
  289. 288 rpm -qf $(which ifconfig)
  290. 289 rpm -ql net-tools
  291. 290 rpm -ql net-tools | less
  292. 291 yum remove net-tools
  293. 292 cat /etc/redhat-release
  294. 293 cat /etc/os-release
  295. 294 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement