posts tagged with the keyword ‘osx’

2016.01.16

Spotlight

Typically if I need to find a file while my Mac is connected to a network volume, I can easily search that volume using the Finder. This usually works well, and I can find what I need. This doesn’t work at all for the Windows shares I have to use at work.

It’s a full-on Windows environment at work, and everyone has a Windows machine on their desk. I’m the only one who uses a Mac as their primary computer. I do all my own support, which is fine. I just have to find my own workarounds sometimes.

ls -laR

Since I often have to look through one of the Windows shares for old files, I’m stuck browsing since I cannot search, so I originally went into the terminal and did a ls -laR and dumped it to a file so I could easily search for specific files. This sort of worked, but since the listing via ls lists the directory and then all the files in the directory, I had to look at more than a single line of text to find the path to the file I wanted.

find $PWD

I then found the power of combining find with $PWD for find $PWD. This allowed me to list every single file on the Windows share, and dump it all to a file (which is 18MB) that I can easily grep in about a second.

The file’s information isn’t real-time, but I’m typically not looking for new files, but old files that someone else created years ago. I can always refresh my local store every week or so.

If I need to find every Arduino sketch, it’s now as easy as egrep -i '\.ino' ~/WindowsShare.txt

2016.01.05

MsgViewer

Occasionally I save an email message from Thunderbird to a file, and when I do that the file has an .eml extension. For those new to this concept, the .eml file extension is usually applied to files in the MIME RFC 822 standard format used by email applications. You can open that .eml file using Thunderbird (which is available on Mac OS X, Windows, and Linux) or using Mail.app on Mac OS X, and I’m sure using many other applications that adhere to the standards. I can even open .eml files in a text editor and easily read the text/plain portion of a multi-part email message.

Unfortunately I recently came across some emails with a .msg extension. It seems that Microsoft Outlook saves emails files to disk as .msg files, which is probably not the MIME RFC 822 standard format, and is some weird format you can’t easily read without Outlook… (It’s actually based on the “Compound File Binary Format” and require a MAPI-aware application to view them.)

Luckily MsgViewer is an application (well, a JAR file) which (as long as you’ve got Java installed) can open these .msg files. You can grab MsgViewer from SourceForge.

And seriously, why does Microsoft do this kind of stuff??

2016.01.04

*nix

Hey there… Dan Gillmor moved to Linux and it’s even better than he expected!

As for me, I’ve been using Mac OS X pretty much since it came out, and before that I used System 9, 8, 7, etc… Operating systems created by Apple. I’ve also used FreeBSD in the past (though mainly on servers) and I’ve been using Linux in some form or another for close to 20 years. Along the way I’ve also used Windows, though always for work, never for fun.

I’m going to call out a few things Dan mentions, just so I can comment on them.

…here I am, writing this piece on a laptop computer running the Linux* operating system and LibreOffice Writer, not on a Mac or Windows machine using Microsoft Word. All is well.

Luckily you can use LibreOffice on Mac OS X, Windows, and Linux. You can also use OpenOffice on Mac OS X, Windows, and Linux. And hey, you can also run NeoOffice on Mac OS X (sorry Windows and Linux users) which is what I did years ago before OpenOffice ran on Mac OS X.

This brings up a point I’d like to expand on, that even if you run Mac OS X (or Windows) you can almost always lean towards the open alternative that is available. This might mean LibreOffice instead of Microsoft Office, and it may mean Thunderbird instead of Mail.app, or Firefox instead of Safari.

Other software I use includes jEdit, Arduino, Processing, Fritzing, Inkscape, Audacity, OpenSCAD, and yes… those are all available for Mac OS X, Windows, and Linux. You might also notice that (almost) all of the websites listed end with .org, which is telling.

The applications you use all depend on what you do with a computer, and what you use a computer for. I tend to use computers to make things, and luckily the specific things I like to make fit in well with the software I use.

Some of the applications listed above rely on Java. I’ve always had a love/hate relationship with Java, but it does help a lot of software run on multiple platforms. One of the applications listed relies on an X11, or more specifically, XQuartz. X11.app used to be distributed by Apple, but they abandoned it, but that’s okay because XQuartz exists.

One application I use that is not available for Linux is Evernote. I should say “not officially available”, since there is Nevernote and Geeknote. Yeah, often you can find an unofficial client for Linux that might work.

Of course if your work demands you use specific software, you may not be able to exclusively run Linux. Oh well…

Now…

No one should ever have to open a command-line window and type “sudo apt-get update” or other such instructions.

I tend to cringe when I see things a computer user should never have to do. I mean, if you want to do X, you may have to learn Y, right? Now, personally, great power comes from being able to open a command line window and type commands. It’s not always the easiest thing to do, though sometimes it is the easier thing to do, if you have the knowledge. If you don’t want to open a command line window and type things, chances are good you won’t have to. (But you should anyway, if you really want to harness the power of your computer. As long as it’s running *nix, I mean. Sorry, Windows users!)

And then…

It’s almost certainly too late for Linux to be a hugely popular desktop/laptop operating system, at least in the developed world.

Maybe, I don’t know… I have seen Linux change over the last two decades, and I’m still excited about what I see.

Dan did say “desktop/laptop operating system”, but let’s look elsewhere. Linux is used on servers, and appliances, and things. What do I mean by “things”? Well, every Raspberry Pi project runs Linux. Here’s 400+ projects running Linux. Here’s a few more projects and some tutorials, all using Linux. I even use Linux computers at work (building exhibits) that just play sounds. Using Linux on a Raspberry Pi makes sense for this, and lots of other things.

Anyway, Dan’s post is good (though it’s strange it’s posted on Medium instead of his own web site, because, freedom and all that) and I’d urge anyone who is not familiar with Linux to take a look at it. It’s pretty awesome. So is open source, and freedom, and the command line.

2015.12.27

Mac OS X & Windows

It’s been a long time since I had to use Windows servers, probably ten years and six operating system versions. Back then I dealt with Windows shares not as an admin, but a normal user. I ended up writing utilities in bash or Perl that would delete .DS_Store files and “dot underscore” files being written to Windows shares by Mac OS X. Now that I am again dealing with Windows shares (again, not as an admin) I thought I should dust off my old scripts (one of which is dated 2002.)

But it seems the world has changed in the last ten years, and now I can deal with “dot underbar” (the proper name) using dot_clean, which is built into Mac OS X. I’ll also be using dot_clean on DOS formatted thumb drives and SD cards that are going into other operating systems.

There’s still those pesky .DS_Store files, which I do not want littering any of the Windows shares at work. It seems you can prevent .DS_Store file creation on network volumes by using the following command:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

That should make for neater volumes and file shares when I move things around… Now if only I could deal with the other annoying Windows server stuff. Often I cannot rename or delete a file or folder on a Windows share. Sometimes I’ll try it from a Windows machine instead of from Mac OS X, and occasionally it will work, but often I’m only able to move all the files out of a folder and then can’t delete a folder. If I can rename an empty folder, I end up renaming it “delete me” but I still cannot delete them. Does everyone have these sort of Windows issues? (Again, I am not an admin, just a normal user.)

Sometimes I really miss of the Mac OS X-based servers I used to run. (Well, every time I have to use a Windows server, actually.)

2015.11.15

Oops!

Last week was a bad week for hardware… On Saturday I opened up my MacBook Pro to wake it from sleep and start using it (which I do multiple times per day) and it was a no go. It did not wake up. I restarted it and got the old blinking system folder, as if the drive was gone, or corrupt, or something. It was a hard drive I didn’t fully trust, and even though I thought about replacing it just weeks ago, I didn’t.

The first thing I did was assumed the drive was shot, and got on Amazon to order a replacement hard drive. I ordered on Saturday and it arrived about 24 hours later… on a Sunday. (Thanks, Amazon!)

Meanwhile, I pulled the drive out of the MacBook and put it in an external case. It worked fine. Damn. This told me it was probably a hardware issue with the MacBook, not the drive. I’ve been through this one before… twice actually, and I’m really wishing Apple would make better hardware!

I ran from the external drive until Wednesday, when I took it to the Apple Store. Oh, in the meantime I had put a replacement drive in the MacBook after I installed a fresh version of 10.9 onto it. (I figured I had to show the Apple Store the issue and I really don’t like them having access to my data.)

They fixed it the same night, and it was all good. (Replaced the hard drive cable/bracket assembly.) We booted it up in the store, it worked, so I went home and I went to sleep. The next morning I woke up at 6am, and swapped in my original hard drive. This is where things went to shit. Did you notice I forgot to shut it down? Yes… I highly recommend you do not try to hot swap the hard drive in your MacBook Pro while it is in sleep mode.

When I opened the Mac to start it (and it was already on) it showed the desktop from the drive I pulled out… probably not a good sign. A reboot later everything was gone. No good on the drive. But like we all know, even if you can’t see your data, it’s probably still there.

A quick Google search for destroyed partition table mac brought me to the blog post Repair a Mac OS X HFS+ Partition table.

I pretty much did everything [PERR0_HUNTER] suggested, and BAM! just like that my partition table was back, and the drive was as it was before I completely screwed it up. I immediately used the ‘Donate’ link on the site to send [PERR0_HUNTER] some money.

The rest of the story is pretty boring, involving running restores and more backups and going through eight hard drives I have in the office. But hey, I’m back up and running… All good. Thanks, [PERR0_HUNTER]!

And the lesson is, don’t swap your hard drive before 8am.

« Older Entries |


buy the button:

Buy The Button