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
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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.