当前位置:网站首页>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
边栏推荐
- Socket TCP for network communication (I)
- 抓包整理外篇fiddler———— 会话栏与过滤器[二]
- php 获取文件夹下面的文件列表和文件夹列表
- PHP export word method (one MHT)
- Fundamentals of concurrent programming (III)
- Why can't my MySQL container start
- Atomic atomic operation
- Dart: self study system
- [learning notes] DP status and transfer
- regular expression
猜你喜欢

2.8 overview of ViewModel knowledge

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

Vulnhub's Nagini

OpenGL index cache object EBO and lineweight mode

Introduction to the implementation principle of rxjs observable filter operator

Wechat applet - basic content

Symlink(): solution to protocol error in PHP artisan storage:link on win10

shardingSphere分库分表<3>

Swagger

PHP export word method (phpword)
随机推荐
(construction notes) learning experience of MIT reading
MCDF Experiment 1
Qt OpenGL 旋转、平移、缩放
2.9 overview of databinding knowledge points
Vulnhub pyexp
vulnhub之Nagini
PHP get the file list and folder list under the folder
PHP export word method (one MHT)
023 ([template] minimum spanning tree) (minimum spanning tree)
Redis
145. Post order traversal of binary tree
【mysql专项】读锁和写锁
If you can't learn, you have to learn. Jetpack compose writes an im app (II)
Flutter: about monitoring on flutter applications
Oracle advanced (I) realize DMP by expdp impdp command
Adult adult adult
Redis notes 01: Introduction
New features of ES6
Jsup crawls Baidu Encyclopedia
ArcGIS application (XXI) ArcMap method of deleting layer specified features