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
# These can be copied and pasted, one line at a time, to the Terminal, but since they recursively target | |
# specific folders, be sure to use this exact syntax to avoid any problems: | |
sudo rm -rf ~/.Trash | |
sudo rm -rf /Volumes/*/.Trashes |
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
system_profiler SPDisplaysDataType | grep Resolution |
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
#!/bin/bash | |
mem=$(sysctl -n hw.memsize) | |
mem="$((mem/1073741274)) GB" | |
echo $mem |
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
#!/bin/bash | |
cpu=$(sysctl -n machdep.cpu.brand_string) | |
# removes (R) and (TM) from the CPU name so it fits in a standard 80 window | |
cpu=$(echo "$cpu" | awk '$1=$1' | sed 's/([A-Z]\{1,2\})//g') | |
echo "$cpu" |
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
#!/bin/bash | |
disk=$(df -Hl | head -2 | tail -1) | |
dpercent=$(echo "$disk" | awk '{print $5}') | |
dfree=$(echo "$disk" | awk '{print $4}') | |
dused=$(echo "$disk" | awk '{print $3}') | |
dcapacity=$(echo "$disk" | awk '{print $2}') | |
echo "$disk" |
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
#!/bin/bash | |
hostname=$(HOSTNAME | sed 's/.local//g' | sed 's/.gateway//g' ) | |
# if hostname is >35 characters, truncates to make it fit on std. 80 window | |
if [ ${#HOSTNAME} -gt 35 ] | |
then | |
hostname=${HOSTNAME:0:35} | |
fi |
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
#!/bin/bash | |
model=$(system_profiler SPHardwareDataType | awk '/Model Identifier/ { print $3 }') | |
# use grep to find the model in the list, then delete from ) to end of line | |
modelname=`grep $model $DIR/Models.txt | sed -e 's/).*/)/g'` | |
echo $modelname |
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
stat -f %OLp <any accessible file> |
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
networksetup -listallhardwareports |
OlderNewer