diff -bu
-b: ignore space change
-u: output NUM (default 3) lines of unified contextInterpretation from left to right. Pipe read from file descirptor 1.
command 2>&1 >/dev/null | wc -lThis will redirect stderr to stdout, but stderr will not redirect to /dev/null.
command >/dev/null 2>&1 | wc -lThis will redirect stderr to stdout, and stderr will also redirect to /dev/null.
But pipe will still get the stderr. > /dev/null will not change the fact that stderr is redirected to pipe.
export MANPATH="/Applications/X/C/D/P/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:$MANPATH"git checkout branchname
git rebase -i master
git config user.name "Your name"
git config user.email "Your email"
git checkout branchname
# some work and some commits
# some time passes
git fetch upstream
git rebase upstream/master
git checkout master
git fetch upstream
git merge upstream/master (or git rebase upstream/master)
git rebase -i HEAD~2 ( Or use the option in IDE )
git push origin +branchname --force
It is useful when you want to push a folder to a different branch. For example, push public/ to gh-pages
git worktree add -B gh-pages public upstream/gh-pages
netstat -tpln
ssh-keygen -t rsa(with default config)
ssh-copy-id root@172.100.51.192
ssh root@ip.address
Tool: tcpdump
tcpdump -i vmgmt port http and dst www.heise.de
scp your_username@remotehost.edu:foobar.txt /local/dir
umount -l /path/to/busy-device
umount -f /path/to/busy-network-file-system
dd if=/dev/urandom of=sample.txt bs=1G count=1
dd if=/dev/urandom of=sample.txt bs=64M count=16
/etc/init.d/firewall start
/etc/init.d/firewall stop
show databases;
GRANT ALL ON `DATABASE`.* TO 'user'@'localhost' IDENTIFIED BY 'password';