編輯自己用戶下的 .bash_profile文件
創(chuàng)新互聯(lián)是一家以網(wǎng)站設(shè)計建設(shè),成都小程序開發(fā)、網(wǎng)站開發(fā)設(shè)計,網(wǎng)絡(luò)軟件產(chǎn)品開發(fā),企業(yè)互聯(lián)網(wǎng)推廣服務(wù)為主的民營科技公司。主要業(yè)務(wù)涵蓋:為客戶提供網(wǎng)站策劃、網(wǎng)站設(shè)計、網(wǎng)站開發(fā)、域名注冊、網(wǎng)站優(yōu)化排名、買友情鏈接等服務(wù)領(lǐng)域。憑借建站老客戶口碑做市場,建設(shè)網(wǎng)站時,根據(jù)市場搜索規(guī)律和搜索引擎的排名收錄規(guī)律編程,全力為建站客戶設(shè)計制作排名好的網(wǎng)站,深受老客戶認可和贊譽。# .bash_profile
#export
PS1="\n\e[1;32m[\e[0;31m\u\e[0;34m@\e[0;31m\h\e[1;32m]\e[1;32m[\e[0;34m\w\e[1;32m]$"
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/bin/:/usr/local/bin:/usr/sbin:/sbin
export PATH
unset USERNAME
umask 022
#Custom DJRavine Modification
login_pwd=`pwd`;
login_data=`date`;
login_users=`users`;
logic_uptime=`uptime`;
server_ip=`/sbin/ifconfig |grep 'inet addr:'|grep -v '127.0.0.1'|head -1|cut -d: -f2|awk '{print $1}'`;
disk_available=$(df -h --block-size=1024|awk '{ sum += $4; } END {print sum;}');
disk_used=$(df -h --block-size=1024|awk '{ sum += $3; } END {print sum;}');
disk_size=$(df -h --block-size=1024|awk '{ sum += $2; } END {print sum;}');
disk_available_gb=$(echo "scale=2; $disk_available/(1024^2)" |bc)
disk_used_gb=$(echo "scale=2; $disk_used/(1024^2)" |bc)
disk_size_gb=$(echo "scale=2; $disk_size/(1024^2)" |bc)
red="\033[31m"
blue="\033[34m"
green="\033[32m"
echo -e " "
echo -e "${blue}+---------------------------------------------------------------"
echo -e "${green} Welcome! "
echo -e "${blue}+---------------------------------------------------------------"
echo -e " ${green}Server IP: ${red}"$server_ip
echo -e " ${green}Date: ${red}"$login_data
echo -e " ${green}Users: ${red}"$login_users
echo -e " ${green}Directory: ${red}"$login_pwd
echo -e " ${green}Uptime: ${red}"$logic_uptime
echo -e "${blue}+---------------------------------------------------------------"
echo -e " "
df -lh|column -c 6|awk '{printf "\033[22;32m%s\t%s\t\033[22;31m%s\t%s\t%s\n",$1,$6,$2,$3,$4,$5}'
echo -e " ${green}Total Disk Space: ${red}$disk_size_gb GB"
echo -e " ${green}Total Used Space: ${red}$disk_used_gb GB"
echo -e " ${green}Total Free Space: ${red}$disk_available_gb GB"
echo -e "${blue}+---------------------------------------------------------------"
PATH=$PATH:$HOME/bin
export PATH
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。