編輯自己用戶下的 .bash_profile文件
成都創(chuàng)新互聯(lián)公司自成立以來,一直致力于為企業(yè)提供從網(wǎng)站策劃、網(wǎng)站設計、成都做網(wǎng)站、網(wǎng)站設計、電子商務、網(wǎng)站推廣、網(wǎng)站優(yōu)化到為企業(yè)提供個性化軟件開發(fā)等基于互聯(lián)網(wǎng)的全面整合營銷服務。公司擁有豐富的網(wǎng)站建設和互聯(lián)網(wǎng)應用系統(tǒng)開發(fā)管理經驗、成熟的應用系統(tǒng)解決方案、優(yōu)秀的網(wǎng)站開發(fā)工程師團隊及專業(yè)的網(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ǎng)站題目:定制自己的shell登錄腳本
本文來源:http://aaarwkj.com/article46/gihpeg.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、電子商務、網(wǎng)站設計、微信小程序、App開發(fā)、網(wǎng)站設計公司
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)