meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:bash:start [2026/06/11 14:14] titannetlinux:bash:start [2026/06/11 16:11] (current) titannet
Line 6: Line 6:
 | ''%%>>%%'' | append to existing file | | ''%%>>%%'' | append to existing file |
 | ''%%|%%'' | pipe output | | ''%%|%%'' | pipe output |
 +
 +| ''diff'' | show differences |
 +
 +====== Headline ======
 +
 +| ''tar -tvf'' | List with details |
 +| ''tar czf data.tar.gz <folder/files>'' | compress file |
 +| ''tar -cjf archive.tar.bz2 <folder/files>'' | compress with bzip2 |
 +| ''tar -xzf data.tar.gz'' | decompress file | 
 +| ''tar -rvf archive.tar newfile'' | append to file |
 +
 +
  
 ====== Terminal Shortcuts ====== ====== Terminal Shortcuts ======
Line 20: Line 32:
 ===== Background processes ===== ===== Background processes =====
  
-| jobs | list jobs | +''jobs'' | list jobs | 
-| fg %# | move to foreground | +''fg %#'' | move to foreground | 
-| bg | continue in background | +''bg'' | continue in background | 
-| kill %# or kill <pid> | kill process | +''kill %#'' or ''kill <pid>'' | kill process | 
-| kill -9 .. | terminate |+''kill -9 ..'' | terminate |
  
  
 ===== Filtering ===== ===== Filtering =====
  
-| grep | Find strings in files | +''grep'' | Find strings in files | 
-| sort | Sort file |+''sort'' | Sort file |
 | ''%%sort | uniq%%'', ''sort -u'' | Sort & remove duplicates | | ''%%sort | uniq%%'', ''sort -u'' | Sort & remove duplicates |
-| wc | word count | +''wc'' | word count | 
-| awk | don't ask | +''awk'' | don't ask | 
-| sed | replace characters in file | +''sed'' | replace characters in file | 
-| jq | filter json | +''jq'', ''jq .'' | filter json | 
-+ 
 +===== Search ===== 
 + 
 + 
 +===== Others ===== 
 + 
 +''%%echo 'ABC=' | base64 -d%%'' | decode base64 | 
 +| ''md5sum <file>'', ''sha256sum <file>'' | create checksum | 
 + 
 +| visidata | search tabular/log files | 
 + 
 + 
 + 
 +===== Log analysis ===== 
 + 
 +<source bash> 
 +<nowiki> 
 +sudo awk '{print $1" "$2" "$3, $4, $5, substr($0, index($0,$6))}' /var/log/auth.log | jq -R -c 'split(" ") | {timestamp: (.[0]+" "+.[1]+" "+.[2]), hostname: .[3], process: .[4], message: .[5:] | join(" ")}' > auth.json 
 +</nowiki> 
 +</source>