当前位置:网站首页>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
边栏推荐
猜你喜欢

During FTP login, the error "530 login incorrect.login failed" is reported

Colleagues wrote a responsibility chain model, with countless bugs

为什么我的mysql容器启动不了呢
![[learning notes] DP status and transfer](/img/5e/59c64d2fe08b89fba2d7e1e6de2761.png)
[learning notes] DP status and transfer

实现验证码验证

If you can't learn, you have to learn. Jetpack compose writes an im app (I)

Unicode encoding table download

ES6新特性

Itext7 uses iexternalsignature container for signature and signature verification

网络通讯之Socket-Tcp(一)
随机推荐
DEJA_VU3D - Cesium功能集 之 053-地下模式效果
Socket TCP for network communication (I)
Integer string int mutual conversion
023(【模板】最小生成树)(最小生成树)
Visual studio 2022 downloading and configuring opencv4.5.5
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
Use of QT OpenGL camera
Adult adult adult
145. Post order traversal of binary tree
(構造筆記)從類、API、框架三個層面學習如何設計可複用軟件實體的具體技術
Unity3d learning notes 5 - create sub mesh
OpenGL index cache object EBO and lineweight mode
Qt OpenGL 旋转、平移、缩放
pragma-pack语法与使用
2.9 overview of databinding knowledge points
Develop plug-ins for idea
Why can't my MySQL container start
在网上炒股开户可以吗?资金安全吗?
(构造笔记)GRASP学习心得