当前位置:网站首页>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
边栏推荐
- 2.7 overview of livedata knowledge points
- LeetCode 0556.下一个更大元素 III - 4步讲完
- win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
- [combinatorics] permutation and combination (example of permutation and combination)
- Summary of development issues
- Flutter: about monitoring on flutter applications
- Go language to realize static server
- shardingSphere分库分表<3>
- Use of QT OpenGL camera
- Duplicate numbers in the array of sword finger offer 03
猜你喜欢
Shutter widget: centerslice attribute
2.8 overview of ViewModel knowledge
CGroup introduction
QT OpenGL texture map
Wechat applet - basic content
【附下载】密码获取工具LaZagne安装及使用
Why can't my MySQL container start
Php Export word method (One MHT)
Integer string int mutual conversion
[learning notes] DP status and transfer
随机推荐
在网上炒股开户可以吗?资金安全吗?
php 获取文件夹下面的文件列表和文件夹列表
PHP export word method (one MHT)
PHP get the file list and folder list under the folder
2.9 overview of databinding knowledge points
(construction notes) grasp learning experience
网络通讯之Socket-Tcp(一)
Vulnhub's Nagini
Shardingsphere sub database and sub table < 3 >
DNS multi-point deployment IP anycast+bgp actual combat analysis
CGroup introduction
【嵌入式】---- 内存四区介绍
[combinatorics] permutation and combination (summary of permutation and combination content | selection problem | set permutation | set combination)
Dart: view the dill compiled code file
Solve msvcp120d DLL and msvcr120d DLL missing
repo Manifest Format
Wechat applet development - page Jump transfer parameters
Shell: basic learning
New features of ES6
网上炒股开户安不安全?谁给回答一下