100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Samenvatting belangrijke commando's CN2 $5.93   Add to cart

Summary

Samenvatting belangrijke commando's CN2

 7 views  0 purchase
  • Course
  • Institution

Samenvatting belangrijke commando's CN2

Preview 2 out of 5  pages

  • January 17, 2023
  • 5
  • 2020/2021
  • Summary
avatar-seller
dict -d fd-eng-nld "how are you" vertalen

~ knop-option + N

| output als input volgende gebruiken

; meerdere commando’s samenvoegen

echo ‘some text’ > file1 maak bestand file1 → bevat ‘some text’

echo ‘some extra text’ >> file1 lijn bijvoegen in file1

pwgen > file random password genereren in file

ssh -p 22345 r0697468@leia.uclllabs.be inloggen op leia zonder key
ww: Peutie64

scp -P 22345 r0697468@leia.uclllabs.be:t.txt . file van leia → naar lokale machine kopiëren

scp -P 22345 bes.txt r0697468@leia.uclllabs.be:test file van lokale machine → naar leia kopiëren

scp -P 22345 hallo.txt bestand van lokale pc naar leia kopieren
r0697468@leia.uclllabs.be:/home/LDAP/r0697468/h
allo.txt

chmod [u,g,o] [+,-,=] [r,w,x] filenames permissions wijzigen
chmod u=rwx,g=rw,o=r file1.txt | chmod u=rwx,g=rwx,o=rwx file3.txt

grep [options] ‘pattern’ [file] zoekt patroon in bestand
print lijnen met patroon
-v → toont niet matchende lines for pattern

touch $(date +"%Y.%m.%d").test2 bestand aanmaken met datum in naam

cut -d “ “ -f3,4,4 cut → selecteert columns van file
-d → specificeert scheidingsteken
date | cut -d " " -f3,4,5 > date.txt -f → column nummer

awk ‘{print $kolomnummer}’ [file] awk → print $n kolom van file
ls -l | awk ‘{print $kolomnummer}’

tr -s ' ' vervang teken dat meermaals voorkomt door 1X
tr -s ' teken' (vervang meerdere spaties door 1)

ls /map | xargs command loop → voor elke lijn van input → commando
cat todelete.txt | xargs rm uitvoeren

for foo in $(ls /home/ldapusers); do touch $foo; done andere manier loop → als xargs niet beschikbaar

ls | while read foo; do echo $foo; done while loop

find [path] [expression] zoeken in file hiërarchie

sort -r [file] sorteer file
- r → reverse alfabetisch

, 2>/dev/null foutboodschappen weglaten

ssh-keygen key genereren (id_rsa.pub)
in ~/.ssh op pc lokaal
kopieer deze key naar destination
~/.ssh/authorized_keys op leia

ssh user@leia.uclllabs.be -p 22345 -i met id_rsa.pub bestand inloggen
"/path/to/your grandmothers identity_file"

ssh leia Host leia
HostName leia.uclllabs.be
Port 22345
User r1234567
In config op eigen pc zetten

who Kijken op leia wie ingelogd

inloggen op leia Chatten via netcat
nc -l 12000 = poort naar keuze
!venster laten open staan

!tweede venster openen
nc leia.uclllabs.be 12000


tshark -D lijst van all netwerk interfaces die je kan capteren

tshark -P -i en0 -w catture.pcap -F pcaap -c 2 saving capture
-i → capture interface
-w → output file
-F → file format
-c → max aantal pakketten om te lezen
-P → schrijft gegevens naar bestand & toont
pakketoverzicht in terminal

tshark -r [input file] eerder opgeslagen bestand lezen

tshark -r [file] -V -Y ‘frame.number == $number’ toont een enkel pakket
-V → om details weer te geven van pakket

tshark -r [file] -O ‘dns’ -Y ‘frame.number == $number’ -O → details van specifiek protocol

tshark -r [file] -Y ‘filter’ Filtering captures
tshark -r [file] -Y ‘http.response.code == 404’

tshark -i en0 -Y http.request -T fields -e http.host -e extracting van frame data
http.user_agent -T → specieferen dat we velden willen bekijken
-e → specifieren we welke velden

tshark -G fields | grep ‘[\t]zoek\..*’ geeft lijst mogelijke velden
tshark -G fields | grep ‘[\t]ftp\..*’

tshark -G | grep “zoek\.” geeft lijst van mogelijke filters
tshark -G | grep “http\.”

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller marlenebraem. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.93. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.93
  • (0)
  Add to cart