当前位置:网站首页>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
边栏推荐
猜你喜欢
Flutter 退出登录二次确认怎么做才更优雅?
Develop plug-ins for idea
Wechat applet - basic content
ES6新特性
ArcGIS application (XXI) ArcMap method of deleting layer specified features
[learning notes] DP status and transfer
Vulnhub pyexp
Duplicate numbers in the array of sword finger offer 03
PHP export word method (one MHT)
Php Export word method (One MHT)
随机推荐
OpenGL 绘制彩色的三角形
PHP导出word方法(一mht)
145. Post order traversal of binary tree
shardingSphere分库分表<3>
init. RC service failed to start
网络通讯之Socket-Tcp(一)
PHP导出word方法(一phpword)
2.7 overview of livedata knowledge points
Dart: self study system
Shell: basic learning
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
Laravel time zone timezone
[combinatorics] permutation and combination (example of permutation and combination)
DEJA_ Vu3d - 054 of cesium feature set - simulate the whole process of rocket launch
(构造笔记)从类、API、框架三个层面学习如何设计可复用软件实体的具体技术
Solution à la défaillance de l'installation d'Electron
Quantitative calculation research
Redis 笔记 01:入门篇
temp
previous permutation lintcode51