cd <fork>
git checkout master
git fetch upstream
git rebase upstream/master
git push -f
This will make your fork match up with what's upstream
cd <fork>
git checkout master
git fetch upstream
git rebase upstream/master
git push -f
sed -i "s/^M//" filenameYou need to enter ^M by pressing Ctrl and then pressing V and M in succession
sed -i "24s/timeoutValue1/timeValue2/" fileName
grep -E "ERROR|FAIL" filename
grep "ERROR\|FAIL" filename
grep -v "PASS" filename
sudo dhclient eth0
grep -v "word" <file or location>For example, the results of a grep search can include a lot of results which are not relevant. Eliminate those by using grep -v
grep "blah" filename | grep -v "foo"
dig +short myip.opendns.com @resolver1.opendns.com
./config.status --config
git clone <my-clone-of-upstream-repo>
cd <upstream-repo>
git remote add upstream <upstream-repo>
git config --global push.default simple
git checkout -b <new-branch>
git fetch upstream
git merge-base new-branch master => This will generate a commit hash
git rebase --interactive <commit hash>
git rebase upstream/master
git push -f
vim -u NONE filename
For commenting a block of text is almost the same: First, go to the first line you want to comment, press CtrlV, and select until the last line. Second, press ShiftI#Esc (then give it a second), and it will insert a#character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type: s/^/#in the second step instead.
yum --disablerepo="*" --enablerepo="reponame" install pkgName