tar -czf archive.tar.gz myfolder/
Compress-Archive -Path myfolder -DestinationPath archive.ziptar -xzf archive.tar.gz
cut -d',' -f3 users.csv
head -n 10 logfile.txt
Get-Content logfile.txt -TotalCount 10wc -l logfile.txt
(Get-Content logfile.txt).Countoutput:
152 logfile.txtcut -d":" -f1 /etc/passwd
Get-Content file.txt | ForEach-Object { $_.Split(":")[0] }grep -rn "motif" .
grep -rl 'motif' ./ | xargs sed -i 's/motif/nouveau/g'
du -ah . | sort -rh | head -n 10
sort file.txt | uniq -c | sort -nr | head -n 5
history
Get-Historydmesg | tail -n 20
find . -type f -mtime -1
journalctl -u nginx -n 50
ip addr show
dig example.com
ping -c 3 example.com
nc -zv host 443
ss -tuln
kill -9 1234
Stop-Process -Id 1234 -Forcefor host in server1 server2 server3; do ssh $host "uptime"; done
sleep 60 &
Start-Job { Start-Sleep 60 }ps aux
Get-Processtop -p <PID>
at now + 5 minutes -f script.sh
Start-Sleep 300 ; .\script.ps1crontab -e
schtaskssystemctl enable serviceName
systemctl start serviceName
Start-Service serviceNamesystemctl status serviceName
Get-Service serviceNametail -f -n 5 fichier.log
tail -f -n +1 app.log | nl
journalctl -f
Get-Content -Path C:\path\to\log -Wait -Tail 50ps -eo pid,comm,%cpu --sort=-%cpu | head -n 10
du -sh *
df -h
top
free -h