Showing posts with label cmdline. Show all posts
Showing posts with label cmdline. Show all posts

Thursday, September 16, 2010

Tree listing - bash scripts/commands for OS X

ok I was wanting to view my music directories and found this lovely command

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' | grep -v DS_Store

at Murhpy's wonderful site.

piping it to the grep -v removes the .DS_Store files
grep --help for more info

.

Sunday, May 02, 2010

OS X dashboardadvisory locationd phoning home

having noticed my machine 'phoning home' (dashboardadvisory) I thought I'd take a look and see if I should be concerned about it.

It would seem no. It's merely keeping the widgets updated and not sending anything particularly personal to home.

But in the interests of documenting code snippets for my own failing memory here's how to unload the dashboardadvisory service:

I found two references, not sure which should (maybe) be scrubbed)

sudo launchctl unload -w \
/System/Library/LaunchDaemons/com.apple.dashboard.advisory.fetch.plist

sudo launchctl unload -w com.apple.dashboard.advisory.fetch

found these references on Digg

locationd: similar scenario only now we're talking about the clock keeping itself updated and it can *try* to assess your location in order to do that.

Found some discussion at Superuser

Again, it would seem not to be a big [privacy] issue.

Sunday, April 25, 2010

Unloading mDNSResponder from OS X

If mDNSResponder is getting out of hand you can unload it,

noting that mDNSResponder is part of OSX's DNS resolution, and therefor network discovery (LAN, WAN etc) requires it (at least to some degree - I need to research more - so, not knowing, I've not unloaded it);

ie. no mDNSResponder, no resolving host names.

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

To turn it back on, just do the opposite:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Thursday, January 08, 2009

OS X screenshots - format & location

Set location & format for OS X screen shots circa OS X 10.4

default shortcut keys are:

Save picture of screen to file: ⌘⇧3
Copy picture of screen to clipboard: ⌘⌃⇧3

Save picture of selected area to file: ⌘⇧4
Copy picture of selected area to clipboard: ⌘⌃⇧4

To modify the location open a terminal window and type:
defaults write com.apple.screencapture location /Users/username/pictures/Screenshots/

I choose to put my screenshots in a folder called 'Screenshots' which is in my Pictures folder.

To modify the format you are using type:
defaults write com.apple.screencapture type image_format

eg.
defaults write com.apple.screencapture type jpg

Replace image_format with your preferred image format; PNG, JPG, TIFF, PICT and I think PDF maybe

You may then have to logout/login to make the change(s) take effect, or try this command in your Terminal window:
killall SystemUIServer

Although Leopard may have done away with this necessity.

Tuesday, October 07, 2008

Removing Thumbs.db on OS X

I recently moved lots of pics from my old Windoze box to my iMac, this resulted in lots of Thumbs.db and Picasa.ini files lying around that I didn't need.

Seeking out a bash script that would erase them all I found:

find / -name "Thumbs.db" -exec rm '{}' \;

I moded that to this:
find /Users/Dee/Pictures/ -name "Thumbs.db" -exec echo '{}' \;

1) to save time time I changed the starting point from '/' (root) to my '/Pictures' dir.
2) I changed the 'rm' (remove' command to 'echo' to *see* what files and where that it would be targeting - silly I know but some small piece of mind, and I love watching a busy terminal .. yeah I know, "small minds ..."