Read files with cat/less, edit with nano, search with grep and find, and chain commands with pipes.
cat file.txt # print entire file
less file.txt # paginated view (q to quit)
head -n 20 file.txt # first 20 lines
tail -n 20 file.txt # last 20 lines
tail -f /var/log/syslog # follow in real-timenano file.txt
# Ctrl+O = save
# Ctrl+X = exit
# Ctrl+W = search
# Ctrl+K = cut line
# Ctrl+U = pastegrep 'error' app.log # lines containing 'error'
grep -i 'error' app.log # case-insensitive
grep -r 'TODO' ./src/ # recursive search
grep -n 'error' app.log # show line numbers
grep -v 'DEBUG' app.log # lines NOT matching
grep -E 'error|warning' app.log # regex: error OR warning
grep -c 'error' app.log # count matching linesfind . -name '*.txt' # by name
find . -name '*.log' -newer config.txt # modified after
find /var/log -size +10M # files over 10MB
find . -type f -name '*.py' -exec grep -l 'import os' {} \;# | passes output of one command as input to the next
cat app.log | grep 'error' | wc -l # count error lines
ls -la | sort -k5 -n # sort by file size
ps aux | grep nginx # find nginx processes
cat /etc/passwd | cut -d: -f1 | sort # list usernames, sortedcat for quick reads, less for long files, tail -f for live logs.grep -r 'pattern' dir/ searches recursively through all files in a directory.| are the Unix superpower: chain simple tools into complex operations.find . -name '*.txt' finds files. Add -exec command {} \; to act on each result.