The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Mac OS X 10.6 Snow Leopard’ Category

some more lsof, netstat and rpcinfo examples

Posted by jpluimers on 2016/03/07

Last friday I updated the examples at *nix networking – lsof: How to tell what process has a specific port open on Linux (via: Server Fault) as I needed to document some of the machines around here (so it becomes easier replacing them).

I also added some links to background information and (when I get to using it: OS X still goes without) a good iproute2 starter page.

–jeroen

Posted in *nix, *nix-tools, Apple, Communications Development, Cygwin, Development, Internet protocol suite, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.6 Snow Leopard, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, TCP | Leave a Comment »

dig show only the answer section: specify both +noall and +answer – via: Server Fault

Posted by jpluimers on 2016/01/25

The solution: add both the +noall and +answer flags before the query.

dig +noall +answer google.de

–jeroen

via dig show only answer – Server Fault.

Posted in *nix, *nix-tools, Apple, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, Power User, SuSE Linux | Leave a Comment »

Getting your public IP address from the command-line

Posted by jpluimers on 2016/01/13

Many sites giving your public IP address return a web page with a bloat of html. From the command-line, you are usually only interested in the IP-address itself. Few services return exactly that.

Below are command-line examples to provide the public IP address mostly from a *nix perspective. Usually you can get similar commands to work with Windows binaries for wget and Windows binaries for curl.

In the end, I’ve opted for commands in this format, as I think akamai will last longer than the other sites (but does not include an end-of-line in the http result hence the echo on Mac/*nix):

I’ve not tried aria2 yet, but might provide commands for that in the future.

These are the Linux permutations for akamai:

curl whatismyip.akamai.com && echo
curl ipv4.whatismyip.akamai.com && echo
curl ipv6.whatismyip.akamai.com && echo
curl ipv4.whatismyip.akamai.com && echo && curl ipv6.whatismyip.akamai.com && echo

The last two are convenient when you have both IPv4 and IPv6 configured on “the outside”.

You can replace curl with wget -q -O – (which outputs to stdout) for each command. You can even ommit the http:// (as that is the default protocol for both curl and wget).

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, bash, bash, Batch-Files, cURL, Development, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development, SuSE Linux, wget | Leave a Comment »

How to verify app signatures in OS X | MacIssues

Posted by jpluimers on 2015/12/18

Interesting:

For codesign verification:

find /Applications -d 1 -name "*.app" -exec codesign --verify --verbose {} \;

For system policy assessment:

find /Applications -d 1 -name "*.app" -exec spctl --assess --verbose {} \;

–jeroen

Source: How to verify app signatures in OS X | MacIssues

Posted in Apple, bash, Development, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.6 Snow Leopard, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development | Leave a Comment »

Mac OS X: getting default route and ip addresses

Posted by jpluimers on 2015/11/30

On Mac OS X, bare route and ifconfig give way too much information to view the most important things at once.

So I used an alias for this:

route -n get default | grep 'gateway' && echo && ifconfig | grep '\: flags\|inet\|inet6'

Later I needed IPv6 support, so I changed it to:

netstat -nr | grep 'Internet\|Gateway\|default' && echo && ifconfig | grep '\: flags\|inet\|inet6'

So you get something like this:

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.178.1      UGSc           23        0     en4
default            192.168.71.1       UGScI           7        0     en0
Internet6:
Destination                             Gateway                         Flags         Netif Expire
default                                 fe80::3631:c4ff:fe47:13f1%en0   UGc             en0

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet6 ::1 prefixlen 128 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet6 fe80::6203:8ff:fea2:4814%en0 prefixlen 64 scopeid 0x4 
    inet 192.168.71.40 netmask 0xffffff00 broadcast 192.168.71.255
    inet6 2001:982:2345:1:6203:8ff:fea2:4814 prefixlen 64 autoconf 
    inet6 2001:982:2345:1:4011:119a:e527:e021 prefixlen 64 autoconf temporary 
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet6 fe80::426c:8fff:fe44:95ea%en4 prefixlen 64 scopeid 0xb 
    inet6 fd00::426c:8fff:fe44:95ea prefixlen 64 detached autoconf 
    inet6 fd00::74a7:8f26:cd22:20b7 prefixlen 64 detached autoconf temporary 
    inet 192.168.178.22 netmask 0xffffff00 broadcast 192.168.178.255

–jeroen

via:

Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

osx – Toggle AppleShowAllFiles with a simple bash script? – Stack Overflow

Posted by jpluimers on 2015/10/15

LOL:

The if syntax of your script was a bit…well, iffy.

Indeed it is:

#!/bin/bash
#toggle AppleShowAllFiles

current_value=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $current_value = "TRUE" ]
then
  defaults write com.apple.finder AppleShowAllFiles FALSE
else
  defaults write com.apple.finder AppleShowAllFiles TRUE
fi

killall Finder

Even the alternative if statement is:

if [[ $(defaults read com.apple.finder AppleShowAllFiles) == TRUE ]]

–jeroen

via osx – Toggle AppleShowAllFiles with a simple bash script? – Stack Overflow.

Posted in Apple, bash, Development, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development | Leave a Comment »

Restore music and video from iPod: the iPod_Control\Music folder

Posted by jpluimers on 2015/10/09

When you’re not a frequent iTunes user, and recycle computer systems, then every once in a while you will get you in to a situation where you have Music on your iPod, but not on your PC any more.

Whereas iTunes is great at putting music on an iPod, it cannot get it back.

There are numerous paid tools to get the music from your iPod, but doing it manually is not that hard. Below are a few links to get you started, but they all come down to this:

  1. Your iPod has a hidden folder called iPod_Control in the root
  2. Inside the iPod_Control folder is a folder called Music
  3. Inside the Music folder, there are folders named with letters and numbers like F00
  4. Each numbered folder has media (music, video or even photos!) files with a strangely encoded name like B00N.mp3 or 3DUN.m4v with supported media extensions including mp3 m4a m4p jpg gif tif m4v mov.
  5. The media files contain meta data with song, artist, album, etc.

The steps to copy them back

  1. Do not erase your iPod when opening it in iTunes!
  2. Ensure you can mount your iPod as a disk (the “enable disk use” option in iTunes)
  3. Mount your iPod as a disk in Mac or PC
  4. Ensure you can view the hidden files
  5. Copy the Music folder including all subfolders to your Mac or PC
  6. Unhide the Music folder and all Music and Music/F* folders inside it using this chflags trick from Unhiding Unix Directories | Apple Support Communities:
    1. chflags nohidden Music
    2. chflags nohidden Music/F*
  7. Add these to your iTunes library and have iTunes re-generate the correct filenames from the meta-data

Some links explaining this in more detail:

–jeroen

Posted in Apple, iPod, iTunes, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9 | 2 Comments »

OSX: Log shell script events to the OS X system consolemacissues.com (If you are familiar with the Unix command line)

Posted by jpluimers on 2015/08/31

Interesting: Log shell script events to the OS X system consolemacissues.com.

–jeroen

via: If you are familiar with the Unix command line and shell scripting, then you….

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

Intermittent but frequent OS X pauses may be from iCloud syncing | MacIssues

Posted by jpluimers on 2015/05/21

fseventer is a great tool for investigating Mac OS X file system events. Like many low-level tools, it requires admin privileges.

This is apparent through the use of the tool “fseventer” which monitors what files on your hard drive are being accessed.

–jeroen

via: Intermittent but frequent OS X pauses may be from iCloud syncing | MacIssues.

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

Setting the SMB/Netbios name of your Mac

Posted by jpluimers on 2015/03/30

Even after changing the name of your Mac, from the Windows side it still looks like this:


C:\Users\developer>net view
Server Name Remark
——————————————————————————-
\\MACBOOKPRO-4C7F Jeroen's MacBook Pro
The command completed successfully.

I knew I had solved this in the past, as the MacBook Air showed up correctly in the list:


C:\Users\developer>net view
Server Name Remark
——————————————————————————-
\\MACBOOKPRO-4C7F Jeroen's MacBook Pro
\\MBAIR133JWP MBAIR133JWP
The command completed successfully.

The trick is that there are 2 names for your Mac: the name for the Apple side of things, and the name for the Windows side of things. For the latter you’d think it would be named SMB or NetBIOS. Read the rest of this entry »

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, SpotLight | Leave a Comment »