find . -name "*.php"
find . -type f -name "*.php" -exec rm -f {} \;
# Delete all except file.txt
find ! -name 'file.txt' -type f -exec rm -f {} +touch --date "2014-01-01" /tmp/foo
find /var/www -newer /tmp/foogrep -irn "func main" .git config --global user.name "name" git config --global user.email "name@gmail.com"
git init .
git add .
git add -A
git commit -m "commit message"
git commit --amend
git commit --amend -m "revise message"
git branch feature132
git checkout feature132
# Create branch and checkout
git checkout -b feature132iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPTlsof -i | less
# note the PID
lsof | grep piduptime - A way to view the load averages.
dmesg | tail - Views the last 10 system messages, if any.
vmstat 1 - Prints a summary of key server statistics on each line.
mpstat -P ALL 1 - Prints CPU time breakdowns per CPU, which can be used to check for an imbalance.
pidstat 1 - Prints a rolling summary instead of clearing the screen.
iostat -xz 1 - A tool for understanding block devices (disks).
free -m - Columns that show buffers and cache.
sar -n DEV 1 - A tool to check the network interface.
sar -n TCP,ETCP 1 - Shows key TCP metrics.
top Run to see if anything looks different from other commands.
Some of the commands require the sysstat package to be installed
tar -czf ~/backup-archive.tar.gz ~/backup/tar -xzvf ~/backup-archive.tar.gztar -tf ~/backup-archive.tarzip -sf ~/compressed.zip