# Basic

查看命令类型: type 'cmd'

查看系统: cat /etc/os-release

man

tldr: https://tldr.sh/

npm install -g tldr 
或者
pip install tldr

cd /usr/bin
sudo ln -s /home/lyhistory/.local/bin/tldr tldr (/usr/bin/tldr)
或者修改.bashrc
export PATH=$PATH:$HOME/.local/bin

# FIND

find . -size +1G -ls | sort -k7n

find / -type f -name "mysql-connector-java-5.1.24.jar" -print

find / -type f -name "Locations.xml" -print

# GREP

https://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/

grep -H -r "syscript" ~ | cut -d: -f1 | sort -u

grep -H -r "create_db.sh" ~ | cut -d: -f1 | sort -u

grep -H -r "/apps/lib" ~ | cut -d: -f1 | sort -u

# du/df

由一次磁盘告警引发的血案 | 你知道 du 和 ls 区别吗?

https://mp.weixin.qq.com/s/BMeSEcQbhC4dcH-oYEtE-g

# crontab

/etc/crontab是系统级别的crontab,系统的设置 crontab -e是用户级的crontab linux下实际保存在/var/spool/cron/username

crontab是分用户的,默认为当前用户,可以通过-u指定用户

日志

/var/log/cron

/var/spool/mail/root

# history

#Delete your Linux history without leaving a trace!
history -d $((HISTCMD-1)) && history -d [line entry number]