Skip to content

Instantly share code, notes, and snippets.

View Roarcannotprogramming's full-sized avatar
:octocat:
Focusing

V1me Roarcannotprogramming

:octocat:
Focusing
View GitHub Profile
function tmc() {
before=$(df -hl / |awk '{print $3}' |tail -n1)
count=0
for snapshot in $(tmutil listlocalsnapshots /|awk -F. '{print $4}');do
let 'count++'
echo "delete snapshot $snapshot"
tmutil deletelocalsnapshots $snapshot;
done
after=$(df -hl / |awk '{print $3}' |tail -n1)
if [[ $count -ne 0 ]]; then