备忘录

  • 选 管理员配置符号链接
    1
    2
    3
    4
    5
    6
    # google C:\Program Files (x86)\Google
    # C:\Program Files\Microsoft Office
    # C:\Program Files\Microsoft Office 15
    mklink /d 默认安装位置 用户指定的安装位置

    New-Item -ItemType SymbolicLink -Path E:\DukePath\path3 -Target E:\DukePath\julia.lnk
文件类型 文件类型 路径 空间占用 适用类型 特点
符号链接 symlink 可相对 很小 文件 可跨磁盘
符号链接 symlinkd 可相对 很小 目录 可跨磁盘
目录联接 junction 绝对 很小 目录 只能跨本地磁盘
硬链接 同源文件 绝对 与源文件大小相同 文件 不可跨分区
快捷方式 lnk 绝对 几百字节,与源文件大小无关 文件、目录、网站、命令 仅人使用舒服
  • Windows 10 环境下,删除任何链接均不会对源文件造成影响。
  • 快捷方式可携带参数使用,程序读写一般是对快捷方式文件操作,而其它方式会直接对源文件操作,或同步操作至源文件。
  • 符号链接使用相对路径会导致移动后失效,而其它方式则不会。
  • 将源文件移除后,只有硬链接依然可以访问,其它方式则将失效。
  • 相比快捷方式,使用符号链接尽管可以节约空间,但无法完全取代快捷方式。
  • 符号链接多用于分离系统和软件分区,解除路径依赖、空间占用问题;整合 path 环境,便于系统的重装和维护。
  • Windows操作系统启动时不支持符号链接。所以不应该对系统盘下系统目录、根目录的系统配置文件、隐藏文件进行操作。

Link 指定新的符号链接名称。

Target 指定新链接引用的路径 (相对或绝对)。

cmd | mklink

1
2
3
4
5
6
7
8
rem 符号链接-文件
mklink Link Target
rem 符号链接-目录
mklink /d Link Target
rem 目录联接
mklink /j Link Target
rem 硬链接
mklink /h Link Target

PowerShell | new-item

1
2
3
4
5
6
# 符号链接
New-Item -ItemType SymbolicLink -Path Link -Target Target
# 目录联接
New-Item -ItemType Junction -Path Link -Target Target
# 硬链接
New-Item -ItemType HardLink -Path Link -Target Target
  • 选 配置快捷键(带参数)

  • 选 删除 OneDrive、自带游戏

  • 选 配置打开文件资源管理器时打开此电脑

  • 选 取消隐私选项

  • 选 默认显示后缀名

  • 选 关闭传递优化

  • 配置用户文件路径

  • 放置配置文件

  • 配置 环境变量

  • 更新驱动

  • 选 安装 wepe

  • 选 下载 windows 10

  • 更新 uwp 应用

  • 安装/配置 压缩软件

  • 安装 浏览器

  • 选 关闭虚拟内存

1. 备份

  • 环境变量 set path
  • 配置文件 wifi、ssh、gradle
    1
    2
    3
    4
    5
    # 显示配置文件
    netsh wlan show profile

    # 导出 WiFi 文件
    netsh wlan export profile folder=D:\ key=clear
  • 软件安装包

在Windows中启用和禁用触摸屏

2. cmd命令的重定向输出

命令的结果可以通过“%>”的形式来定向输出,%表示文件描述符:1为标准输出stdout、2为标准错误stderr。系统默认%值是1,也就是“1>”,而1>可以简写为>,也就是默认为>。stdout的默认目标是终端,stderr的默认目标为也是终端。

来自 <https://blog.csdn.net/earbao/article/details/51790405>

1、将结果输出到result.txt

net stop myservices >>result 2>&1

2、隐藏程序输出结果

net stop myservices >nul 2>nul

来自 <https://blog.csdn.net/earbao/article/details/51790405>

2.1. 重定向操作符 描述 

>  将命令输出写入到文件或设备(如打印机),而不是命令提示符窗口或句柄。 <  从文件而不是从键盘或句柄读入命令输入。 >>  将命令输出添加到文件末尾而不删除文件中已有的信息。 >& 将一个句柄的输出写入到另一个句柄的输入中。 <&  从一个句柄读取输入并将其写入到另一个句柄输出中。 |  从一个命令中读取输出并将其写入另一个命令的输入中。也称作管道。

来自 <https://blog.csdn.net/earbao/article/details/51790405> ## 3. cmd 一行命令执行多条指令

aa && bb means:执行aa,成功后再执行bb

1
node a.js && node b.js
如果a.js运行失败则b.js不会再运行

aa || bb means:先执行aa,若执行成功则不再执行bb,若失败则再执行bb

1
node a.js || node b.js
如果a.js运行失败则b.js再运行,如果a.js运行成功则b.js不再运行

aa & bb means:先执行aa再执行bb,无论aa是否成功

1
node a.js & node b.js
先运行a.js运行,不管运行a.js文件是否报错,b.js接着运行

来自 <https://blog.csdn.net/yrk0556/article/details/104308866>

4. Windows 环境下常用的软件

软件 类别 官网
VScode 文本编辑 https://code.visualstudio.com/
7-zip 压缩 https://www.7-zip.org/
Chrome 浏览器 https://google.cn/chrome/
Snipaste 截图 https://zh.snipaste.com/
AHK 快捷键 https://www.autohotkey.com/
百度网盘 资源 https://yun.baidu.com/
TIM 即时通讯 https://im.qq.com/
企业微信 即时通讯 https://work.weixin.qq.com/
微信 即时通讯 https://weixin.qq.com/
Dism++ 清理 https://www.chuyu.me
GifCam 动图制作 http://blog.bahraniapps.com/gifcam/
GiF Resizer 图片处理 http://www.ashongsoft.com/
Image Converter One 图片处理 http://www.ashongsoft.com/
Rufus U盘启动 https://rufus.ie/zh_CN.html
Lantern 翻墙 https://github.com/getlantern/
DiskGenius 分区 http://www.diskgenius.cn/
火绒 安全 https://www.huorong.cn/
微PE工具箱 系统运维 http://www.wepe.com.cn/
obsidian
MSYS2 https://www.msys2.org
PDF_Guru https://gitee.com/Kevin234/PDF-Guru
marp ppt https://marp.app
WProxy http://www.wfiltericf.com/WProxy.htm
sourcetree https://www.sourcetreeapp.com

5. Windows 运行常用的命令

命令 含义 备注
appwiz.cpl 程序和功能 常用于卸载软件
logoff 注销 注销计算机
shutdown 60秒倒计时关机命令
cmd cmd 命令提示符
calc 计算器
cleanmgr 磁盘清理
msconfig 系统配置实用程序
osk 屏幕键盘
psr 步骤记录器
snippingtool 截图工具 已被截图和草图取代
winver 关于"Windows" 查看 Windows 版本
explorer 资源管理器
regedit 注册表编辑器
taskmgr 任务管理器
compmgmt.msc 计算机管理
devmgmt.msc 设备管理器

6. 双拼输入

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
```

## 7. host

The hosts file is one of several system facilities that assists in addressing network nodes in a computer network. It is a common part of an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

| 系统 | host 文件路径 |
| --------- | ------------------------------------- |
| Windows | C:\Windows\System32\drivers\etc\hosts |
| Linux/Mac | /etc/hosts |

### 7.1. 功能

- 加快域名解析
- 重定向恶意域名
- 虚拟域名

https://github.com/googlehosts/hosts


添加下面两行内容到hosts文件中

151.101.72.249 github.global.ssl.fastly.net

192.30.253.112 github.com

## 8. 文件校验

E:>certutil -hashfile hero.png md5 MD5 哈希(文件 hero.png): fefd01c9db6e3e83b978eff1b7a67c02 CertUtil: -hashfile 命令成功完成。

E:>certutil -hashfile hero.png SHA1 SHA1 哈希(文件 hero.png): f1e929db9cef34a8786ee4b6246fb739566c799d CertUtil: -hashfile 命令成功完成。

E:>certutil -hashfile hero.png SHA256 SHA256 哈希(文件 hero.png): 5b654b2297f17d9106388db31c1190240cfb359144925e892468b40d692c780f CertUtil: -hashfile 命令成功完成。

1
2
3
4
5
6

## 9. 暴力删除废弃文件夹
```cmd
DEL /F /A /Q \\?\%1

RD /S /Q \\?\%1
/P 删除每一个文件之前提示确认。 /F 强制删除只读文件。 /S 从所有子目录删除指定文件。 /Q 安静模式。删除全局通配符时,不要求确认。 /A 根据属性选择要删除的文件。

cmd /c dir:是执行完dir命令后关闭命令窗口;

cmd /k dir:是执行完dir命令后不关闭命令窗口。

10. DOSBOX 配置

1
2
3
4
5
6
7
8
9
10
# 挂载程序目录
mount c D:\Programs_Add\ASM
# 挂载工作目录
mount d E:\DukeLab\ASM
# 将程序加入 path 环境
set path=%path%;c:\;
# 切换到工作目录
d:
# 清屏
cls

https://localhost:5500/em

  • lsnrctl 监听服务管理
1
2
3
4
5
6
# 查看运行状态
lsnrctl status
# 启动监听
lsnrctl start
# 关闭监听
lsnrctl stop
  • sqlplus
1
2
3
4
5
6
7
8
9
10
sqlplus -H
# 不登录
sqlplus /nolog
# 超级管理员
conn / as sysdba # 操作系统身份认证
conn sys as sysdba
# 普通管理员
conn system
# 普通用户(用户名无效)
conn scott
plus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- 启动实例并打开数据库
startup
-- 关闭实例
shutdown
-- 查看当前登录用户
show user;
-- 查看当前登录的用户信息
select * from user_users;
-- 查询用户
select username from dba_users;
-- 执行 sql 文件,导入 scott 用户
@oracle_installer_path\rdbms\admin\scott.sql
-- 解锁 scott 用户
alter user scott account unlock ;
-- 设置 scott 用户的密码为 tiger
alter user scott identified by tiger;

The PATH variable makes it easy to run commonly used programs located in their own folders. If used unwisely, however, the value of the PATH variable can slow down the operating system by searching too many locations, or invalid locations.

Read more »

Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.

Read more »

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content.

Read more »

大学期间在图书馆借的所有书,大一忙的看教科书了,大二没怎么买书,全是图书馆借的看的。每本看完是不可能的,事实是阅读量还没3成。

Read more »

组合是数学的重要概念之一。从 n 个不同元素中每次取出 m 个不同元素 ,不管其顺序合成一组,称为从 n 个元素中不重复地选取 m 个元素的一个组合。所有这样的组合的种数称为组合数。

Read more »
0%