ls - 显示当前文件夹下的内容
cat haha - 显示文件haha的内容
cd hh - 进入文件夹hh
cd - 返回上一层文件夹
mkdir 233 - 在当前文件夹中新建文件夹233
touch 1001.cpp - 在当前文件夹中新建文件1001.cpp
cp - 复制
mv - 移动
rm - 删除
g++ q.cpp -o q - 将源文件q.cpp编译成可执行文件q
gdb C - 调试可执行文件C
./q - 运行可执行文件q
./q < in - 从in中读取
./q < in > out - 从in中读取,输出到out中
git
xjoi@xjoi:~$ git clone https://github.com/ymzqwq/qwerty.git
正克隆到 'qwerty'...
warning: 您似乎克隆了一个空仓库。
检查连接... 完成。
xjoi@xjoi:~$ ls
capturor-linux-x64.tar.xz Desktop live Public topcoder
contestapplet.conf Documents Music qwerty Videos
contestapplet.conf.bak Downloads Pictures Templates ymz
xjoi@xjoi:~$ cd qwerty
xjoi@xjoi:~/qwerty$ ls
xjoi@xjoi:~/qwerty$ touch a.cpp
xjoi@xjoi:~/qwerty$ git add *
xjoi@xjoi:~/qwerty$ git status
位于分支 master
初始提交
要提交的变更:
(使用 "git rm --cached <文件>..." 以取消暂存)
新文件: a.cpp
xjoi@xjoi:~/qwerty$ git commit -m "add new files"
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'xjoi@xjoi.(none)')
xjoi@xjoi:~/qwerty$ git config --global user.email "[email protected]"
xjoi@xjoi:~/qwerty$ git config --global user.name "ymzqwq"
xjoi@xjoi:~/qwerty$ git commit -m "add new files"
[master (根提交) 9f2dcd3] add new files
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a.cpp
xjoi@xjoi:~/qwerty$ git push origin master
Username for 'https://github.com': ymzqwq
Password for 'https://[email protected]':
对象计数中: 3, 完成.
写入对象中: 100% (3/3), 204 bytes | 0 bytes/s, 完成.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/ymzqwq/qwerty.git
* [new branch] master -> master
xjoi@xjoi:~/qwerty$ git pull
Already up-to-date.