Linux Commands Quick Reference
==============================

FILE OPERATIONS
  ls -la                 List files with details
  cat file               Display file contents
  head -n 20 file        First 20 lines
  tail -n 20 file        Last 20 lines
  less file              Page through file
  find . -name "*.txt"   Find files by name
  grep -r "pattern" .    Search file contents recursively
  cp src dest            Copy file
  mv src dest            Move/rename file
  rm file                Delete file
  chmod +x file          Make file executable
  file filename          Determine file type

TEXT PROCESSING
  grep "pattern" file    Search for pattern
  grep -i "pat" file     Case-insensitive search
  sed 's/old/new/g' f    Replace text
  awk '{print $1}' f     Print first column
  sort file              Sort lines
  uniq file              Remove duplicate lines
  wc -l file             Count lines
  cut -d: -f1 file       Cut fields by delimiter
  tr 'a-z' 'A-Z'        Translate characters
  xxd file               Hex dump
  xxd -r hex.txt bin     Reverse hex dump

SYSTEM
  ps aux                 List processes
  kill PID               Kill process
  uname -a               System info
  df -h                  Disk usage
  free -m                Memory usage
  which command          Find command location
  env                    Show environment variables

NETWORKING
  curl URL               HTTP request
  wget URL               Download file
  ping host              Test connectivity
  ss -tlnp               Show listening ports
  ip addr                Show IP addresses
  dig domain             DNS lookup

PERMISSIONS
  chmod 755 file         rwxr-xr-x
  chmod 644 file         rw-r--r--
  chown user:group file  Change ownership

REDIRECTION
  cmd > file             Redirect stdout to file
  cmd >> file            Append stdout to file
  cmd 2> file            Redirect stderr
  cmd1 | cmd2            Pipe output
  cmd < file             Redirect stdin from file
