-
Posts
22 -
Joined
-
Last visited
-
Days Won
2
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by harvey
-
-
On 12/10/2020 at 11:49 PM, sid said:
I needed to add semi-colons to the bash function to get this working for me
modern1 () { osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges'; } modern2 () { osascript -e 'do shell script "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" with administrator privileges'; }
Hi, thanks for the heads up. Version 2.0.2 pushed to Packal
-
On 12/4/2020 at 9:58 PM, Samplex said:
@harveyAny update for Big Sur?
I have released a new version. The code has been completely re-written so please let me know if there are any issues.
I have also added logic to support 11.1+ so if the current command does not change, it should to continue to work without requiring an update.
Please ensure you use v2.0.1
Updated link is https://www.packal.org/workflow/flush-dns-106-110
-
On 12/4/2020 at 9:58 PM, Samplex said:
@harveyAny update for Big Sur?
Working on a small re-write. Should be out this weekend. Thanks
-
2 hours ago, Pierpaolo said:
Added Catalina (simple as 123 thanks to @harvey! )
#!/bin/bash ver=`sw_vers -productVersion` IFS='.' read -r -a array <<< "$ver" if [ ${array[1]} -eq 6 ]; then echo "Version ${ver} is Snow Leopard" osascript -e 'do shell script "sudo dscacheutil -flushcache" with administrator privileges' elif [ ${array[1]} -ge 7 -a ${array[1]} -le 9 ]; then echo "Version ${ver} is Lion, Mountain Lion or Mavericks" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' elif ([ ${array[1]} -eq 10 ] && [ -z ${array[2]} ]) || ([ ${array[1]} -eq 10 ] && [ ${array[2]} -le 3 ]); then echo "Version ${ver} is Yosemite and 10.10.3 or less" osascript -e 'do shell script "sudo discoveryutil mdnsflushcache" with administrator privileges' elif [ ${array[1]} -eq 10 ] && [ ${array[2]} -ge 4 ]; then echo "Version ${ver} is Yosemite and 10.10.4 or higher" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' elif [ ${array[1]} -ge 11 -a ${array[1]} -le 14 ]; then echo "Version ${ver} is El Capitan, Sierra, High Sierra or Mojave" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' elif [ ${array[1]} -ge 14 -a ${array[1]} -le 15 ]; then echo "Version ${ver} is Catalina" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' else echo "Version ${ver} is Unknown" exit 1 fi
Thanks @Pierpaolo for the reminder. I have updated the logic to support 10.15. New version is on Packal.
-
Thanks @bigorno. I have updated logic to support 10.14 Mojave. New version is on Packal. Used a slightly better method:-
#!/bin/bash ver=`sw_vers -productVersion` IFS='.' read -r -a array <<< "$ver" if [ ${array[1]} -eq 6 ]; then echo "Version ${ver} is Snow Leopard" osascript -e 'do shell script "sudo dscacheutil -flushcache" with administrator privileges' elif [ ${array[1]} -ge 7 -a ${array[1]} -le 9 ]; then echo "Version ${ver} is Lion, Mountain Lion or Mavericks" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' elif ([ ${array[1]} -eq 10 ] && [ -z ${array[2]} ]) || ([ ${array[1]} -eq 10 ] && [ ${array[2]} -le 3 ]); then echo "Version ${ver} is Yosemite and 10.10.3 or less" osascript -e 'do shell script "sudo discoveryutil mdnsflushcache" with administrator privileges' elif [ ${array[1]} -eq 10 ] && [ ${array[2]} -ge 4 ]; then echo "Version ${ver} is Yosemite and 10.10.4 or higher" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' elif [ ${array[1]} -ge 11 -a ${array[1]} -le 14 ]; then echo "Version ${ver} is El Capitan, Sierra, High Sierra or Mojave" osascript -e 'do shell script "sudo killall -HUP mDNSResponder" with administrator privileges' else echo "Version ${ver} is Unknown" exit 1 fi
-
18 hours ago, deanishe said:
Where's the toilet gone?
@deanishe @xilopaint Updated workflow with the new icon.
-
-
-
Do the attached look any better @deanishe @xilopaint? Dark and light themes, highlighted and not variations?
-
On 02/04/2018 at 3:24 AM, xilopaint said:
The color of the icon doesn't suit well in Alfred dark themes. Please, consider to change the icon's color to suit both light and dark themes or add an option to change the icon according the theme.
I'm not much of a designer. If your able to provide an icon I'm happy to consider it.
-
On 3/29/2018 at 8:49 AM, iLeopard said:
Thank you for posting this. It proves to be quite useful when performing intense loads.
Your very welcome
-
Thanks @CKIDOW .
This has now been updated on Packal to support 10.13 High Sierra here http://www.packal.org/workflow/flush-dns-106-1011
-
Update 12/1/2017: Support for macOS Sierra 10.12
-
Awesome workflow! Thanks!
No problems, glad it helped
-
A simple command to Flush DNS cache. Compatible with 10.6 through to 12.0. Takes no arguments but asks for system password to run the task as an admin user.
Available on packal.org
Any issues, please let me know.
Update 04/08/2021: Added support for macOS Monterey 12.0. Commands remain the same based on early Betas.
Update 12/12/2020: Bug Fix
Update 06/12/2020: Support for macOS Big Sur 11.0 - Re-written code. Also allowed future to use the current command if it remains valid without future release
Update 22/12/2019: Support for macOS Catalina 10.15
Update 20/1/2019: Support for macOS Mojave 10.14
Update 20/4/2018: Updated icon
Update 24/1/2018: Support for macOS High Sierra 10.13
Update 12/1/2017: Support for macOS Sierra 10.12
-
Ok, new version is up, same link, any problems, please let me know.
-
Sorry, that was be being lazy. Just modifying the script now to work on 10.4, 10.5, 10.6, 10.7 & 10.8, will upload shortly.
-
-
Fantastic idea, thanks!
-
Thanks for the Caffeine port. Functionality slightly different. Used to be able to use 'caff on' or 'caff off' for direct control as well as toggle.
-
Quickly pieced together a workflow to flush your DNS cache. Any comments, please let me know
Download workflow from here: http://goo.gl/i3AOY
Update
v2 uploaded to support different flush command depending on OS version 10.4 -> 10.8
Note, uploading to AlfTP and hope to have it available to download from there soon too.
Flush DNS 10.6 -> 12.0
in Share your Workflows
Posted
Look at me! I'm early this year 🤪
Based on early searches, macOS 12 Monterey seems to use the same commands as macOS 11.
Update the code to more clearly identify new OS' going forward and add support for macOS 12.
New Packal Link: https://www.packal.org/workflow/flush-dns-106-120
Enjoy!