Extract tar.gz linux
Extract a gzipped tar archive to a specific directory
tar -xzf archive.tar.gz -C /target/dir/
more linux
all 133 commands →
Generate random password
openssl rand -base64 32
Check certificate details
openssl s_client -connect example.com:443 </dev/null 2>/dev/null | openssl x509 -noout -dates -subject
Awk — sum a column
awk '{sum += $3} END {print sum}' file.txt
Sed — replace in file
sed -i 's/old-string/new-string/g' file.txt
Sort and deduplicate
sort file.txt | uniq -c | sort -rn | head -20