Tag: OSX
OSX system volume (sound) GET / SET via Terminal / bash
Source: Coderwall.com Manipulate the volume settings on an OSX machine via command line: Get volume # Echos a number from 0 to 100osascript -e ‘output volume of (get volume settings)’ … Read More
TimeMachine cheat sheet *REVISITED 2020
*Easy view table with Sample Output start & stop tmutil startbackup tmutil stopbackup local snapshots tmutil disablelocal tmutil enablelocal exclusions tmutil addexclusion PATH (e.g. ~/TEMP) ** will be sticky (follows … Read More
Apple Mail – create folder and sub-folder structure
Apple Mail gives errors while trying to make a FOLDER and a SUB-FOLDER consecutively. 1. Folder __AAAA__TEST__ is created on the “On My Mac” root. 2. Right-click, to create a … Read More
OSX: Set any password via terminal
To change minimum password length to 1 pwpolicy getaccountpolicies > temp.xml nano temp.xml Erase until first string is <?xml version=”1.0″ encoding=”UTF-8″?> Find string <string>policyAttributePassword matches '^$|.{1,}+'</string> Replace {4,} with {1,} … Read More
Aperture (OSX) to run on Catalina using Retroactive
Aperture will not function beyond OSX Mojave (10.14.6) due to its use of a few 32-bit libraries. Retroactive – solves this by a work around, disabling the features that make … Read More
bash – awk if then else snippet
A clear example of the if/then/else structure formatting in awk. 123456789$ awk ‘ BEGIN { FS="," ; FORMAT="%-10s%-8s%s\n" ; {printf FORMAT,"A","B","% age"} } { … Read More
bash – awk with colored output
Coloring text in columns of output of awk. 12echo "line 1 line 2" | awk ‘/line/ {print "\033[32m" $1 "\033[31m" $2 }’ results in: line1 line2 Color is given by … Read More
bash: for – looping to repeat commands
A one liner to repeat a task/process N number of times. Perform 5 times: 1for n in {1..5}; do <command>; done</command> Add a function to .bashrc / .bash_profile: 1234567function run() … Read More