![]() ![]() Since I don't have any local user level Arial's installed, it doesn't produce anything. This produces nothing since I'm telling it to only look in the /Users/ directory and subdirectories. For example: mdfind -onlyin /Users/ 'kMDItemKind = "TrueType font" & kMDItemFSName = Arial*' Note that you can also direct mdfind to look only in a directory path. In the case of the Gotham fonts, are they also TrueType, or some other format? I'm not familiar with that font, so I don't know. You could pass that result to a loop rm command to remove them all from the Mac as it processes the above list. I suppose you could drop the kMDItemKind query, but then you'd run the risk of grabbing a file with the word "Arial" in it if it was Spotlight indexed. In this case, I'm ok with specifying TrueType since I doubt there are other Arial font types floating around. ![]() Obviously this only locates any TrueType versions of Arial, so if there were other formats perhaps, it wouldn't pull them up. You can use the below script to install fonts to Font Book in devices by running a simple command. Library/Fonts/Microsoft/Arial Bold Italic.ttf Library/Fonts/Microsoft/Arial Italic.ttf Library/Fonts/Arial Narrow Bold Italic.ttf Library/Fonts Disabled/Arial Bold Italic.ttf This produces the following list on my Mac: /Library/Fonts Disabled/Arial.ttf You could possibly do this a little more concisely with mdfind (Spotlight command line)įor example, if I wanted to find all versions of Arial on my Mac, I might do something like this mdfind 'kMDItemKind = "TrueType font" & kMDItemFSName = Arial*' #reads out the total number of fonts removed. #adds the two file locations and sets them as a variable for use later in the echo statement. This is an assumption but should cover the bases pretty throughly. #searches the two locations on the computer where the Gotham font would live. #This script is designed to remove all Gotham fonts from the /Library/Font + in the user library font folder as well.ĬOUNT=$(rm -v /Library/Fonts/Gotham* 2> /dev/null | wc -l)ĬOUNT1=$(rm -v /Users/*/Library/Fonts/Gotham* 2> /dev/null | wc -l) I tried outset and I think that works for the system lvl font removal but not the user. When called from the JSS I can’t seem to get it to run under the right user (with login hooks which I really can’t get working or with a startup script). Upon restart or logging in I am calling the script. I am trying to make this deployed safely so we are first having a policy that asked the user for restart. The script works great when called from check in, running under the sudo user. Here is the problem that I am running up against. I know that it could be a little dangerous using the wildcard but it seems to work ok. ![]() I have a script that removes the Gotham font family from users computer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |