1.3 notepad++ 插件
1.3.1 hex查看插件
https://www.cnblogs.com/yucloud/p/10934511.html
(1) 工具包下载:https://github.com/chcg/NPP_HexEdit/releases HexEditor插件,解压出一个dll
(2) 然后打开Notepad++,插件 - 打开插件目录,新建文件夹HexEditor
(3) 然后把dll丢在HexEditor目录里,重启Notepadd++就ok了
1.3.2 notepade++ compare 插件
https://www.cnblogs.com/xinglichao/p/9176106.html
(2) 然后打开Notepad++,插件 - 打开插件目录,Notepad++\plugins中新建文件夹ComparePlugin
(3) 然后把dll丢在ComparePlugin目录里,重启Notepadd++就ok了
1.3.3 notepad++正则表达
.
匹配任意一个字符$
其左边的表达式被匹配在行尾。如:e 匹配以“ e ”结尾的行方法 − − 查找串: a b c . ∗ 匹配以“e”结尾的行 方法 -- 查找串:abc.* 匹配以“e”结尾的行方法−−查找串:abc.∗
1.3.4 notepad++ mark支持
https://www.jianshu.com/p/2e71fb403106
1.4 Cygwin Setup
可以在 Windows下面安装 cygwin 来模拟 Linux 环境,cygwin下面可以使用git
、repo
, vim/cscope
等很多工具,推荐用户使用 cygwin在 Windows下面模拟Linux环境。
1.4.1 cygwin 分屏支持
如果想使用分屏功能,可以在cygwin中安装 fatty 工具。
Link: https://github.com/juho-p/fatty
git clone https://github.com/juho-p/fatty.git
cd fatty
make
cp src/fatty.exe /bin
执行 “ctrl+shift+t
” 时,如果出现下面问题,在cygwin终端执行 “fatty
”,然后把老的窗口关掉,在新窗口中重新执行“ctrl+shift+t
”即可。
-bash: $‘\302\224’: command not found
To create new tab, press ctrl-shift-T ctrl-shift-W closes the tab To
change active tab, click it with mouse or press shift-(left
arrow|right arrow) To move tab, press ctrl-shift-(arrow direction)
https://blog.csdn.net/xieqiaokang/article/details/109954223
为了避免每次需要打开 Cygwin 后再输入 fatty 才能进入多标签终端,可以在桌面新建一快捷方式。点击 新建 快捷方式 后输入 ${Cygwin安装路径}\bin\fatty.exe -
,如
C:\cygwin64\bin\fatty.exe -
1.4.2 cygwin 背景设置
cygwin默认背景颜色较差,用户可以将/home/sam/.minttyrc 文件中的内容替换为下面内容来设置背景颜色。
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=255,255,255
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117
Yellow=181,137,0
BoldYellow=101,123,131
Blue=38,139,210
BoldBlue=131,148,150
Magenta=211,54,130
BoldMagenta=108,113,196
Cyan=42,161,152
BoldCyan=147,161,161
White=238,232,213
BoldWhite=253,246,227
Locale=C
Charset=UTF-8
FontHeight=10
BoldAsFont=no
BellTaskbar=yes
1.4.3 cygwin minicom
为了方便用户查看保存串口log,用户可以在 cygwin 中安装 minicom,使用方法和 Linux minicom很类似。
链接:https://blog.csdn.net/weixin_30856965/article/details/94850415
1.4.5 minicom 安装依赖的软件和库
apt-cyg install autoconf automake make libncurses-devel
note: 安装命令工具"apt-cyg“ 可以到网上自行load。
https://github.com/transcode-open/apt-cyg
git clone git@github.com:transcode-open/apt-cyg.git
- 1)cygwin minicom 源码
wget https://fossies.org/linux/misc/minicom-2.7.1.tar.gz
tar -xvf minicom-2.7.1.tar.gz
cd minicom-2.7.1
./configure
make -j4
make install
- 2)cygwin minicom usage
minicom -D /dev/ttySx:打开串口
ctrl+a+l:抓log
ctrl+a+o 设置波特率
ctr+a+l //保存log
如果遇到在cygwin终端执行命令时间较长,且有点卡时,此时去查看360安全卫士是否打开,如果打开的话需要将其关掉。
1.4.6 windos 10 ubuntu 安装
https://zhuanlan.zhihu.com/p/62658094
1.7.2 全局变量设置
1). 全局的对所有用户都可以的使用的PATH:
可以通过修改配置文件: /etc/bashrc 和 /etc/profile 来时配置,全局的PATH;
例如: vi /etc/profile
在最后后加一行:PATH=THE_SET_GLOBLE_ENV_PATH:$PATH
; 接着换行: export PATH
如果使其立即生效: source /etc/profile
2). 对于普通用户也可以设置,自己的路径:在自己的home目录中:ls -a | grep bash
会 找到两个文件: .bashrc 和 .bash_profile 同样可以像修改 /etc/profile一样,修改 .bash_profile 来配置你的个性PATH 环境。同样修改后,若不重启,就使其立即生效的话,不要忘了 source .bash_profile. 看看修改后的PATH:
echo $PATH
或者 env 再者 set !!
vim ~/.bashrc
export DESKTOP=//cygdrive/c/Users/sam/Desktop
source ~/.bashrc
1.7.3 系统性能查看命令
apt-cyg install procps
. 这步执行成功后,就可以使用top命令了。
watch "ps -W | grep chrome
" //只查看和谷歌相关的进程
https://blog.csdn.net/wj78080458/article/details/86663906
1.8 Windows cmd 常用命令
cmd 窗口全屏显示
Alt+Enter
查看历史命令:
F7
目录创建:
md or mkdir d:test
删除目录:
rd/s/q test
rd or rmdir test
创建文件:
cd . > test.c
删除文件:
del test.c
文件重命名:
rename orignal_name.c current_name.c
1.8.1 cmd 文件属性管理
查看当前文件夹,以及其子文件夹下的文件属性:
attrib /s
attrib /s /d
还可以查看文件属性
给一个文件添加属性,给文件1.txt 同时添加 只读、系统、隐藏 三个文件属性
attrib +r +s +h 1.txt
删除一个文件的文件属性:
attrib -r -s -h 1.txt
查看文件夹已经子文件下的所有以.txt结尾的文件属性:
attrib *.txt /s /d
1.8.2 cmd 查找功能
- 查找文件,例如在c盘下查找3.txt
dir c:\3.txt /s /b
/s
显示指定目录和所有子目录中的文件。
/b
使用空格式(没有标题信息或摘要)。
- 查找d盘aaa目录下包含abc的所有文件
findstr /s /n "abc" d:\aaa\*
/n:
在匹配的每行前打印行数。
- 文件中搜索字符串,在5.txt文件中忽略大小写查找pid字符串,并带行号显示查找后的结果
find /N /I "pid" 555.txt
- 查找可执行文件使用where命令,类似linux下的which命令
where cmd
1.8.3 cmd 支持 vim
- 右击我的电脑–>”属性“ -->“高级系统设置”–>“环境变量”
- 在“系统变量”或者“用户变量”下面找到“path”选项
- 将“
C:\cygwin64\bin
”添加到path中 - 在cmd命令行中执行“PATH” 确定环境变量是否设置成功。如果设置成功最后一句即为新加的内容
1.8.4 cmd 代理设置
win + R
set http_proxy=http://127.0.0.1:1189
set https_proxy=http://127.0.0.1:1189
后面的为自己的代理服务器的地址。上面命令的作用是设置环境变量,不用担心,这种环境变量只会持续到cmd窗口关闭,不是系统环境变量。一定要用cmd命令行,别用powershell,否则无效。另外,测试是否成功用curl https://www.google.com, 别用ping。
1.8.5 cmd查看md5值
certutil -hashfile 123.MP4 MD5
1.8.6 cmd alias
https://www.cnblogs.com/onelikeone/p/10783497.html
1.8.7 ConsoleZ
- 参考网址
https://blog.csdn.net/weixin_34185364/article/details/85663690
https://blog.csdn.net/weixin_33901926/article/details/91966610 - 热键配置
在hotkeys下即可配置快捷键 - 平台添加
在tabls选项下增加 Cygiwn sh,并且配置background - 鼠标相关的设置:
菜单”—>Edit—>Setting…—>Mouse
如复制黏贴 - 鼠标放在空白处,右键即可以调出各个菜单栏
1.8.8 重定向输出
shell上:
0
表示标准输入
1
表示标准输出
2
表示标准错误输出
默认为标准输出重定向,与 1> 相同
2>&1 意思是把 标准错误输出 重定向到 标准输出.
&>file 意思是把 标准输出 和 标准错误输出 都重定向到文件file中