Logo Passei Direto
Buscar
Material
páginas com resultados encontrados.
páginas com resultados encontrados.

Prévia do material em texto

UNIX & GIT ADVANCED TECHNICAL SUMMARY
A compact advanced-level reference for Unix/Linux power users and Git professionals.
PART 1 – ADVANCED UNIX / LINUX
1. Command Chains and Pipes
Pipes (|) pass output between commands.
grep, awk, sed can be chained for text processing.
Examples:
cat /var/log/syslog | grep ERROR | awk '{print $1,$2,$5}' | sort | uniq -c
ps aux | grep apache | awk '{print $2}' | xargs kill -9
find . -type f -name "*.log" | xargs grep -H "fatal"
2. Redirections and Command Substitution
stdout (1), stderr (2), stdin (0)
cmd > file # redirect output
cmd 2> err.txt # redirect errors
cmd &> all.txt # both stdout and stderr
VAR=$(command) # capture command output
3. Text & Data Processing Tools
grep -E for extended regex.
awk for field-based processing:
awk -F: '{print $1,$3}' /etc/passwd
sed for replacements:
sed -i 's/error/ERROR/g' file.txt
find for advanced searches:
find /var/log -type f -mtime -1 -exec gzip {} \;
4. Shell Scripting & Automation
Variables: VAR=value
Control Flow:
if [ -f file.txt ]; then echo "Exists"; fi
for f in *.log; do gzip "$f"; done
while read line; do echo $line; done

Mais conteúdos dessa disciplina