Bash
Encode and decode base64
echo "id" | base64
# aWQK
echo "aWQK" | base64 -d | bash
uid=1000(user)
Check if a file exists
if [ -f /etc/passwd ]; then
echo "File exists"
else
echo "File does not exist"
fi
Find files
find / -name "passwd"
Find files by extension
find / -name "*.txt"