https://blog.51cto.com/amunlinux/2426478
The previous article described the deployment of nginx+vsftpd download and upload services
This chapter will write about history optimization and cd The directory name is automatically displayed when you go to a new directory
cat /etc/profile
export USER_IP=who -u am i 2>/dev/null| awk'{print $NF}'| sed -e's/[()]//g'
export HISTTIMEFORMAT=”[%F %T][whoami
][${USER_IP}] “ p>
alias cd=’cdp(){ cd $1;pwd;};cdp’
These are the main parameters, and other parameters can be added by themselves, such as how many history records can be saved Add it.
Demonstration:
Welcome to join my WeChat group
https://blog.51cto.com/amunlinux/2426485