当前位置:网站首页>2020-11_ Technical experience set
2020-11_ Technical experience set
2022-07-03 12:16:00 【jackaroo2020】
1. How to refresh local DNS cache ?
# Administrator permission open cmd Command window
ipconfig /flushdns
2. windons How to open it quickly hosts file ?
- Shortcut keys win+r Exhale “ function ” Program
- Enter... In the run box drivers, then “ determine ”
- In the pop-up folder , open etc Folder
- etc Visible in the folder HOSTS file , Right click “ open ”
3. vi Using skills
- edit
Enter... On the command line vi +26 samp.txt The command directly opens the file to 26 That's ok , stay vi You can also enter
:set number This command displays the line number on the left side of the editor . - Fast navigation
i Change the working mode from “ Command mode ” Change to “ The input mode ”, And start inserting content at the current cursor position .
a Except that you start inserting content after the cursor , The effect is the same as above .
o Start inserting content at the next line of the cursor . - Delete
x Delete the character of the current cursor .
dd Delete current row ( Yes , The whole line !)
Let's look at the terrible part :30dd Delete the following from the current line 30 That's ok ! Please be careful when using this command . - Search for
Search for < > And move the cursor to the first match .
Navigate to the next match of the word , Please enter n And continue to press , Until you find what you are looking for . - Save and exit
:x Save your work and exit Vi . - Replace
:%s/desktop/laptop/g This command will be in the whole file “desktop” use “laptop” Replace , He's like Linux Of sed command .
4. Linux command
# Upload to ftp The server
wget --ftp-user=<username> --ftp-password=<passwd> ftp://<server_ip>/<file_path>
# decompression tar file
tar -zxvf <filename>.tar.gz
5. Kafka command
# View all topic list
./kafka-topics.sh --zookeeper {ip}:2181 --list
# establish topic The theme
./kafka-topics.sh --create --zookeeper {ip}:2181 --replication-factor 1 --partitions 1 --topic {topic_name}
# Create producer messages
./kafka-console-producer.sh --broker-list {ip}:9093 --topic {topic_name}
# see topic news
./kafka-console-consumer.sh --bootstrap-server {ip}:9093 --topic {topic_name} --from-beginning
# eliminate kafka Group message
./kafka-consumer-groups.sh --bootstrap-server {ip}:9093 --group {group_name} --topic {topic_name} --reset-offsets --to-earliest --execute
6. Kubectl command
# view help
kubectl --help
# Look at the mirror image
docker images |grep <sts_name>
# Replace the image version number
kubectl edit sts <sts_name>
# Restart the service
kubectl delete po <server_name>
Into the container
kubectl exec -it <containerName> bash
# View the service real-time log
kubectl logs <containerName> -f
# Show Pod Details of , Especially view pod Log when cannot be created
kubectl describe pod <pod-name>
7. Redis command
# Select database
select 1
FQA
1. Linux Command how to test api?
curl -H "Content-Type: application/json" -X POST -d '{ "pageNo": 1, "pageSize": 10 }' "http://127.0.0.1:8080/test"
2. Warning FailedScheduling default-scheduler 0/1 nodes are available: 1 Insufficient cpu.
# (1) View service information
kubectl describe nodes
# (2) Edit to stop other unused service copies , Free up resources
kubectl edit sts <sts_name>
# (3) Just restart the service
3. How to see the type of server graphics card ?
nvidia -smi
4. vi How to quickly replace words
dw # Intercept the next word
5. redis How to get key Expiration time ?
TTL Command is used to get the remaining time of key expiration ( second ).
Return value
Integer value in milliseconds TTL Or negative value
TTL In Milliseconds .
-1, If key No expiration timeout .
-2, If the key doesn't exist .
ttl key
6. git commit Modify the last submitted annotation information ?
git commit --amend
7. git Merge multiple Commit?
# edit n Time submission record , open vi after , After the first pick Change it to s Save and exit , Pop up submission comments , Modify and save .
git rebase -i HEAD~n
# Undo modify , Return to the state before the merge operation
git rebase --abort
边栏推荐
- CGroup introduction
- Use of QT OpenGL camera
- Flutter: about monitoring on flutter applications
- Laravel time zone timezone
- DEJA_VU3D - Cesium功能集 之 053-地下模式效果
- DEJA_ Vu3d - cesium feature set 053 underground mode effect
- Php Export word method (One MHT)
- Systemverilog-- OOP--对象的拷贝
- Dart: About zone
- 安裝electron失敗的解决辦法
猜你喜欢

shardingSphere分库分表<3>

4000字超详解指针

Flutter 退出登录二次确认怎么做才更优雅?

OpenGL 索引缓存对象EBO和线宽模式

Shutter widget: centerslice attribute

C language improvement article (wchar_t) character type

Integer string int mutual conversion

Summary of development issues

win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法

If you can't learn, you have to learn. Jetpack compose writes an im app (I)
随机推荐
adb push apk
Redis notes 01: Introduction
Qt OpenGL 旋转、平移、缩放
Flutter: self study system
[learning notes] DP status and transfer
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
Unity3d learning notes 5 - create sub mesh
Shardingsphere sub database and sub table < 3 >
Solution à la défaillance de l'installation d'Electron
Laravel time zone timezone
4000字超详解指针
Symlink(): solution to protocol error in PHP artisan storage:link on win10
PHP導出word方法(一mht)
Solve msvcp120d DLL and msvcr120d DLL missing
【嵌入式】---- 内存四区介绍
网络通讯之Socket-Tcp(一)
OpenGL 索引缓存对象EBO和线宽模式
Master and backup role election strategy in kept
Jsup crawls Baidu Encyclopedia
Dart: about Libraries