Advertisement
sandervanvugt

linfun day2 nov22

Nov 2nd, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. [root@linfun ~]# history
  2. 1 exit
  3. 2 tar cvf etc.tar /etc
  4. 3 ls -l
  5. 4 tar czvf etc.tgz /etc
  6. 5 ls -l
  7. 6 tar cjvf etc.tgz /etc
  8. 7 ls -l
  9. 8 tar cJvf etc.tar.xz /etc
  10. 9 ls -l
  11. 10 ls
  12. 11 tar -tvf etc.tgz
  13. 12 mkdir /extracted; tar -xvf etc.tgz -C /extracted/
  14. 13 ls -l /extracted/
  15. 14 ls -l /extracted/etc/
  16. 15 echo $PATH
  17. 16 ln /usr/local/bin/countdown /usr/bin/countdown
  18. 17 countdown 8
  19. 18 mkdir /tmp/files/videos
  20. 19 mkdir --help
  21. 20 mkdir -p /tmp/files/videos /tmp/files/photos /tmp/files/pictures
  22. 21 tree /tmp
  23. 22 tree /tmp/files/
  24. 23 cp /etc/[a-c]* /tmp/files/
  25. 24 cd /tmp/files/
  26. 25 ls
  27. 26 mv [ab]* photos/
  28. 27 mv c* videos/
  29. 28 tree
  30. 29 man find
  31. 30 find /etc -size +1000c -exec ls -l {} \;
  32. 31 find /etc -size -1000c -exec cp {} /tmp/files/pictures/ \;
  33. 32 tree
  34. 33 pwd
  35. 34 ln -s /var .
  36. 35 ls
  37. 36 ls -l
  38. 37 tar czvf home /home
  39. 38 ls -l
  40. 39 file home
  41. 40 gunzip home
  42. 41 gunzip --help
  43. 42 mkdir /tmp/archive; tar xvf home -C /tmp/archive
  44. 43 ls -l /tmp/archive/
  45. 44 ls -l /etc/hosts
  46. 45 ls -il /etc/hosts
  47. 46 man find
  48. 47 find / -inum 33621468
  49. 48 #find / -inum 33621468 -exec rm -f {} \;
  50. 49 find / -name "[a-c]*
  51. 50 "
  52. 51 cd /etc
  53. 52 ls [a-c]*
  54. 53 ls -d [a-c]*
  55. 54 cd
  56. 55 countdown 12
  57. 56 vimtutor
  58. 57 vim myfile
  59. 58 less /var/log/messages
  60. 59 head /etc/passwd
  61. 60 head -3 /etc/passwd
  62. 61 tail /etc/passwd
  63. 62 tail /etc/passwd | head -1
  64. 63 cat myfile
  65. 64 tac myfile
  66. 65 which passwd
  67. 66 cat /bin/passwd
  68. 67 reset
  69. 68 strings /bin/passwd
  70. 69 xxd /bin/passwd
  71. 70 cd /etc
  72. 71 grep lisa *
  73. 72 grep lisa * 2>/dev/null
  74. 73 grep -i lisa * 2>/dev/null
  75. 74 grep -i lisa * 2>/dev/null | grep -v Localisa
  76. 75 grep -il lisa * 2>/dev/null
  77. 76 cd
  78. 77 dnf install -y git
  79. 78 git clone https://github.com/sandervanvugt/cka
  80. 79 cd cka
  81. 80 grep 'spec' *
  82. 81 grep 'spec' rolling.yaml
  83. 82 grep 'spec' -A 5 rolling.yaml
  84. 83 cd
  85. 84 vim regexfile
  86. 85 cat regexfile
  87. 86 grep '^lea' regexfile
  88. 87 grep '^anna' regexfile
  89. 88 grep 'anna$' regexfile
  90. 89 grep '^anna$' regexfile
  91. 90 grep '^anna\b' regexfile
  92. 91 grep '^anna' regexfile
  93. 92 cat regexfile
  94. 93 grep 'b.*t' regexfile
  95. 94 echo bot >> regexfile
  96. 95 cat regexfile
  97. 96 grep 'bo+t' regexfile
  98. 97 grep -E 'bo+t' regexfile
  99. 98 grep -E 'bo?t' regexfile
  100. 99 grep 'bo\{2\}t' regexfile
  101. 100 grep 'boot' regexfile
  102. 101 man semanage-fcontext
  103. 102 cut -d : -f 1 /etc/passwd
  104. 103 tail /etc/passwd
  105. 104 cut -d : -f 1 /etc/passwd
  106. 105 cut -d : -f 6 /etc/passwd
  107. 106 cut -d : -f 3 /etc/passwd
  108. 107 cut -d : -f 3 /etc/passwd | sort
  109. 108 cut -d : -f 3 /etc/passwd | sort -n
  110. 109 ls -l | sort
  111. 110 ls -l | sort -k 8
  112. 111 ls -l | sort -k 9
  113. 112 echo hello
  114. 113 echo hello | tr [:lower"
  115. 114 echo hello | tr [:lower:] [:upper:]
  116. 115 echo hello | tr [a-l] [m-z]
  117. 116 sed -n 5p /etc/passwd
  118. 117 sed -i 's/anna/ANNA/g' regexfile
  119. 118 cat regexfile
  120. 119 sed -i -e '2d' regexfile
  121. 120 cat regexfile
  122. 121 echo hello 1.txt
  123. 122 for i in {1..9}; do echo $i; done
  124. 123 for i in {1..9}; do echo hello > $i.txt; done
  125. 124 ls
  126. 125 for i in *txt; do sed -i 's/hello/break/g' $i; done
  127. 126 cat 6.txt
  128. 127 cat 3.txt
  129. 128 history
  130. 129 awk -F : '/lisa/ { print $4 }' /etc/passwd
  131. 130 grep lisa /etc/passwd | cut -d : -f 4
  132. 131 awk -F : '$3 > 999 { print $1 }' /etc/passwd
  133. 132 man troff
  134. 133 countdown 4
  135. 134 head -5 /etc/passwd | tail -1
  136. 135 sed -n 5p /etc/passwd
  137. 136 ps aux | awk '{ print $1 }'
  138. 137 history
  139. 138 grep -l '^root' /etc/*
  140. 139 grep -l '^root' /etc/* 2>/dev/null
  141. 140 grep '^...$' /etc/* 2>/dev/null
  142. 141 vim regexfile
  143. 142 grep 'alex\b' regexfile
  144. 143 grep '^...$' /etc/* 2> greperrors.txt
  145. 144 cat greperrors.txt
  146. 145 man grep
  147. 146 cat /etc/services
  148. 147 sort < /etc/services
  149. 148 sort /etc/services
  150. 149 ls > myfile
  151. 150 cat myfile
  152. 151 who
  153. 152 who > myfile
  154. 153 cat myfile
  155. 154 ls >> myfile
  156. 155 cat myfile
  157. 156 grep -R root /proc
  158. 157 grep -R root /proc 2>/dev/null
  159. 158 grep -R root /etc 2>/dev/null
  160. 159 grep -R root /etc &>/dev/null
  161. 160 grep -R root /etc &> myfile
  162. 161 ps aux
  163. 162 ps aux | wc
  164. 163 ps aux | grep ssh
  165. 164 ps aux | grep ssh | grep -v grep
  166. 165 ps aux | tee psfile | grep ssh | grep -v grep
  167. 166 cat psfile
  168. 167 history
  169. 168 exit
  170. 169 history
  171. 170 cat .bash_history
  172. 171 useradd linda
  173. 172 echo password | passwd --stdin linda
  174. 173 history -d 173
  175. 174 grep -E 'bo?t' regexfile
  176. 175 who
  177. 176 man grep
  178. 177 touch kugiugiuguiiuguigiugigigihwgbiftuydtrsresxfgchjytsrthxtyjchkuvgc
  179. 178 ls -l
  180. 179 rm -f kugiugiuguiiuguigiugigigihwgbiftuydtrsresxfgchjytsrthxtyjchkuvgc
  181. 180 users
  182. 181 nmcli connection show ens33
  183. 182 dnf install bash-completion
  184. 183 env
  185. 184 echo $PATH
  186. 185 echo $SHELL
  187. 186 echo $LANG
  188. 187 ls --help
  189. 188 echo $LANG
  190. 189 export LANG=fr_FR.UTF-8
  191. 190 ls --help
  192. 191 export LANG=es_ES.UTF-8
  193. 192 ls --help
  194. 193 man ls
  195. 194 alias
  196. 195 alias english='export LANG=en_US.UTF-8'
  197. 196 english
  198. 197 vim /etc/bashrc
  199. 198 vim /etc/profile
  200. 199 cd /etc/profile.d/
  201. 200 ls
  202. 201 vim colorls.sh
  203. 202 cd
  204. 203 while true; do true; done &
  205. 204 sleep 3600
  206. 205 bg
  207. 206 jobs
  208. 207 fg
  209. 208 top
  210. 209 while true; do true; done &
  211. 210 top
  212. 211 ps aux | grep bash
  213. 212 ps aux
  214. 213 ps aux | grep '-bash'
  215. 214 ps aux | grep -- '-bash'
  216. 215 ps aux | grep -- '-bash' | awk '$3 > 40'
  217. 216 ps aux | grep -- '-bash' | awk '$3 > 40 { print $2 }'
  218. 217 kill $(ps aux | grep -- '-bash' | awk '$3 > 40 { print $2 }')
  219. 218 history
  220. 219 cd /
  221. 220 ls -l
  222. 221 cd /home/lisa/
  223. 222 touch rootfile *
  224. 223 su - lisa
  225. 224 cd
  226. 225 useradd anna
  227. 226 groupadd sales
  228. 227 usermod -aG sales anna
  229. 228 usermod -aG sales linda
  230. 229 mkdir -p /data/sales
  231. 230 ls -l /data/sales
  232. 231 ls -ld /data/sales
  233. 232 chown anna:sales /data/sales
  234. 233 ls -ld /data/sales
  235. 234 chmod 770 /data/sales
  236. 235 su - linda
  237. 236 mount /dev/sda1 /mnt
  238. 237 mount
  239. 238 cd /mnt
  240. 239 ls
  241. 240 journalctl
  242. 241 systemctl status sshd
  243. 242 journalctl -xb
  244. 243 cd /var/log
  245. 244 ls
  246. 245 ls -lrt
  247. 246 tail messages
  248. 247 mount
  249. 248 umount /mnt
  250. 249 cd
  251. 250 history
  252.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement