Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Limit size of Time Machine backups on Time Capsule' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Limit size of Time Machine backups on Time Capsule
Authored by: scottlepich on Mar 17, '10 08:01:46AM

Thanks for the tips. Here's a one-liner that should give you the sparsebundle name you need from the terminal (provided your computer name is sensible and doesn't have any spaces in it):

name=`system_profiler | grep "Computer Name" | awk '{print $3}'` && addr=`ifconfig en0 | grep ether | awk '{print $2}' | sed 's/\://g'` && echo "${name}_${addr}.sparsebundle"

Cheers!



[ Reply to This | # ]
10.5: Limit size of Time Machine backups on Time Capsule
Authored by: ClunkClunk on Mar 19, '10 12:14:59PM
Works with spaces in the machine's sharing name:
name=`system_profiler | grep "Computer Name" | awk '{print $0}' | sed 's/Computer\ Name\://g'` && addr=`ifconfig en0 | grep ether | awk '{print $2}' | sed 's/\://g'` && echo "${name}_${addr}.sparsebundle"


[ Reply to This | # ]
10.5: Limit size of Time Machine backups on Time Capsule
Authored by: gusbear on Mar 25, '10 08:15:23AM
Not to be pedantic, but I can't help myself:
echo "$(system_profiler | sed -ne 's/.*Computer Name: //p')_$(ifconfig en0 | awk '$1=="ether"{gsub(":","");print$NF}').sparsebundle"
Using grep, sed and awk all at the same time is a pet peeve. :P Actually I can do the whole thing with a single awk, but that was more complicated than just doing the above.

[ Reply to This | # ]