cd fir-<tab>
-> cd first (Quick completion)
abs path
rel path
mkdir -p mydir1/mydir2
-> will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error.
mv aa bb
-> rename or move
cp aa bb
-> copy
sudo -> SuperUser do
sudo su -> root
ugo -> user, group, others
a -> all
rwx -> read(4), write(2), execute(1)
chmod ug+rw mydir
-> drw-rw----
chmod 664 myfile
-> -rw-rw-r--
chmod +x [filename]
-> Enable Run
sudo mv tool.sh /bin
-> To install it and Enable it Run EverywhereTry to install the MarkDown.
gcc -I/path/to/header/
ldd a.out
./configure
make
sudo make install
sudo mv tool.sh /bin
-> To install it and Enable it Run Everywhere
apt-get update
apt-get install git-core
-> install the Git
wget 122.115.61.189/tmp/cc-note
-> Download
dpkg -S /usr/include/stdlib.h
-> -S --search:w hello.c
-> write to hello.cvim -t main
-> should exist the ctagsvim -On file1 file2
-> Vertical Splitvim -on file1 file2
-> Horizontal Split:set nu
-> Show line number:set autoindent
-> Auto indent:h 'autoindent'
-> for help# #include
snippet inc
#include <${1:stdio}.h>${2}
CTRL-N
-> quick completionCTRL-L-K
-> set spellCTRL-X-L
-> quick completion lineCTRL-X-F
-> quick completion the filenameCTRL-x-k
-> check with the dictionary:h i\_Ctrl-<tab>
for help.find .|grep filename
locate stdlib.h
-> and you can use sudo updatedb
to update the datebase.ps aux|grep -i firefox
-> get help from manpagekill -9 18576
unzip [filename]
-> To extract the file[filename]tar xzvf tig-0.17.tar.gz
-> Extract .tar and .gzdiff -u a.c b.c > c
-> Show diff of 'a.c' and 'b.c' to file 'c'patch file1 file2
-> For file1 on the file2 patches.git init
-> Create an empty git repository or reinitialize an existing one.git add h.c
-> Add file contents to the indexgit commit -a -v -m "first version"
-> Record changes to the repository. (-a: All the changes. -v: berbose. -m: Message)git diff
-> Show diff.git reset --hard HEAD
-> Reset current HEAD to the specified state.git checkout <branchname> [-b <new branch name>]
git branch [-d <branchname>]
-> Show branch. -d for delete.git branch [-m <old branchname> <new branchname>]
-> Move/rename a branch and its reflo.[user]
name = Peter Wang
email = happypeter1983@gmail.com
[core]
editor = vim
[alias]
ci = commit -a -v
co = checkout
st = status
br = branch
throw = reset --hard HEAD
throwh = reset --hard HEAD^
[color]
ui = true
[commit]
template = ./.commit-template
[push]
default = current
d
-> Show diff
for file in `ls`
do
if [[ $file == *.md ]]; then
echo $file
fi
done
All by XiaoGuo