CodeMan

Each of us must find a way to love the world. You have found yours.

0%

常用命令速记

基本命令
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cat /proc/version
uname -r
uname -a
lsb_release -a
cat /etc/issue

netstat -an | grep 3306

ls -lh
du -hm --max-depth=2 | sort -nr | head -12
find . -type f -size +800M -print0 | xargs -0 du -h | sort -nr

sudo ntsysv

awk '{print $1}' access_log |sort|uniq|wc -l
awk '{print $1}' access_log |sort|uniq -c|sort -nr |head -10
grep ^111.230.17.31 access_log | awk '{print $1,$7}' > max_acess

同步时间
1
2
3
4
5
6
7
8
9
yum -y install chrony
systemctl enable chronyd
systemctl start chronyd
timedatectl status
timedatectl set-ntp true
timedatectl
timedatectl list-timezones
timedatectl set-timezone Asia/Chongqing

Mac
1
2
3
4

lsof -i:80
sudo killall coreaudiod