Last active
March 15, 2024 01:03
-
-
Save flatlinebb/44bd8de68a9cb2862c8ac846b0ce2400 to your computer and use it in GitHub Desktop.
bash.rc login info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display some useful info at login | |
echo | |
# Display your IP hostname & IP addresses | |
#echo | |
echo " -------------------------------------------------------------------" | |
echo " Hostname: `hostname`" | |
#echo " Your IPv4 Address: `ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | grep -v 10.32. | grep -v 192.168. | cut -d: -f2 | cut -d' ' -f1`" | |
echo " Your IPv4 Address: `ip a | grep eth0 | grep inet | cut -d' ' -f8`" | |
echo " Your IPv6 Address: `ip a | grep inet6 | grep global | cut -d' ' -f6`" | |
echo | |
echo " System information as of `date`" | |
echo " `uptime`" | |
# Display Disk Usage at login | |
echo | |
echo " -------------------------------------------------------------------" | |
echo " Your disk usage in /home/`whoami`:" | |
echo " `/usr/bin/du ~/ --si -s | awk '{printf $1} END {print "B out of 2.9TB"}'`" | |
echo | |
# Display total disk space on /home | |
echo " Total disk space on server:" | |
echo " `df -Hl | grep --color=never Filesystem`" | |
echo " `df -Hl | grep --color=never md1`" | |
echo " `df -Hl | grep --color=never md2`" | |
#echo " `df -Hl | grep --color=never rootfs`" | |
echo " `df -Hl | grep --color=never home`" | |
echo " -------------------------------------------------------------------" | |
echo | |
# Display active screen sessions | |
echo " Your active screen sessions:" | |
echo "`screen -ls | grep -v There | grep -v Sockets > screen_list`" | |
echo "`cat screen_list | grep -v Socket`" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment