cmd常用命令
- 直接搜索栏输入CMD后(不要立即回车进入),按住CTRL+SHIFT+ENTER键可直接进入管理员模式命令行。
notepad "%systemroot%/system32/drivers/etc/hosts"
cmd 打开 hosts
网络DNS修复
1.检查配置是否由于dns,ping www.baidu.com
,如果出现是dns域名解析错误,就是dns的问题
2. 配置dns,检查是否配置好,可以ping dns
3. 刷新dns 缓存ipconfig -flushdns
,需要等待2-3分钟
4. 如果没有解决就是ips
问题输入命名(管理员)netsh winsock reset catalog
5. 重启电脑
用命令行打开文件
在运行中输入命令:
d:\test..\
或者在命令提示符里面输入:
explorer c:\files\(绝对路径)
explorer files (相对路径)
start d:\test..\
explorer和start的区别是
start必须使用绝对路径,
explorer既可以使用绝对路径也可使用相对路径。
即可以打开指定的文件夹,并可以在文件夹内操作,和一般文件夹一样;
git bash 基于win10
创建软连接,note:target 必须是绝对路径,且软连接是linkfile /d/gitlab 不存在这一点与linux中有些不同
ln -s -T /d/Projects/RemoteHub/gitlab/ /d/gitlab
zutnlp@zutnlp:/home$ ln --help
Usage: ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
or: ln [OPTION]... TARGET (2nd form)
or: ln [OPTION]... TARGET... DIRECTORY (3rd form)
or: ln [OPTION]... -t DIRECTORY TARGET... (4th form)
In the 1st form, create a link to TARGET with the name LINK_NAME.
In the 2nd form, create a link to TARGET in the current directory.
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
Create hard links by default, symbolic links with --symbolic.
By default, each destination (name of new link) should not already exist.
When creating hard links, each TARGET must exist. Symbolic links
can hold arbitrary text; if later resolved, a relative link is
interpreted in relation to its parent directory.
Mandatory arguments to long options are mandatory for short options too.
--backup[=CONTROL] make a backup of each existing destination file
-b like --backup but does not accept an argument
-d, -F, --directory allow the superuser to attempt to hard link
directories (note: will probably fail due to
system restrictions, even for the superuser)
-f, --force remove existing destination files
-i, --interactive prompt whether to remove destinations
-L, --logical dereference TARGETs that are symbolic links
-n, --no-dereference treat LINK_NAME as a normal file if
it is a symbolic link to a directory
-P, --physical make hard links directly to symbolic links
-r, --relative create symbolic links relative to link location
-s, --symbolic make symbolic links instead of hard links
-S, --suffix=SUFFIX override the usual backup suffix
-t, --target-directory=DIRECTORY specify the DIRECTORY in which to create
the links
-T, --no-target-directory treat LINK_NAME as a normal file always
-v, --verbose print name of each linked file
--help display this help and exit
--version output version information and exit
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control method may be selected via the --backup option or through
the VERSION_CONTROL environment variable. Here are the values:
none, off never make backups (even if --backup is given)
numbered, t make numbered backups
existing, nil numbered if numbered backups exist, simple otherwise
simple, never always make simple backups
Using -s ignores -L and -P. Otherwise, the last option specified controls
behavior when a TARGET is a symbolic link, defaulting to -P.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/ln>
or available locally via: info '(coreutils) ln invocation'