Change message of the day
This commit is contained in:
9
templates/etc/update-motd.d/06-disk-usage
Executable file
9
templates/etc/update-motd.d/06-disk-usage
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/update-motd.d/colors.txt
|
||||
|
||||
AVAIL="$(df --output=avail -h / | tail -1 | xargs)"
|
||||
USED="$(df --output=used -h / | tail -1 | xargs)"
|
||||
TOTAL="$(df --output=size -h / | tail -1 | xargs)"
|
||||
|
||||
echo -e " ${TITLE_COLOR}Disk................:${NC} Used: ${TEXT_COLOR}$(echo $USED | sed s/[A-Z]*//g)${NC} $(echo $USED | sed s/[^a-zA-Z]*//g)B | Free: ${TEXT_COLOR}$(echo $AVAIL | sed s/[A-Z]*//g)${NC} $(echo $AVAIL | sed s/[^a-zA-Z]*//g)B | Total: ${TEXT_COLOR}$(echo $TOTAL | sed s/[A-Z]*//g)${NC} $(echo $TOTAL | sed s/[^a-zA-Z]*//g)B"
|
||||
Reference in New Issue
Block a user