Of the various Unix utilities I use semi-regularly,
find is the one that has me reaching for its documentation the most often. Every time I do, it’s a reminder of how powerful it can be, if you can just remember how to use it.
This article goes over how to use
find beyond just searching for files by name, mostly just so that I have something to refer back to when I inevitably forget how to use it again.
find usage looks like this:
find path arguments.
find takes a path (searched recursively by default), and a set of arguments.
-name argument is used to find files by name. For files named
myawesomefile in your current directory (including subdirectories), you would run
find . -name myawesomefile.
When looking for a file by name, you can use wildcard characters to help broaden your search. For all Markdown files found in and below your current directory, you could run
find . -name *.markdown
Finding Files By Date
find has support for finding files by last access date, file modification date, and file contents modification date.
To find all files that were edited less than a day ago:
find . -mtime -1. Each of the time arguments (
-mtime, in this case) work 24 hours at a time. You can specify this by adding a qualifier to the end of your time argument;
find . -mtime +60s will return all files modified over a minute ago.
Finding Files By Permissions
Say you want to find all executable files under a directory. This is the incantation for you:
find . -type f -perm +111
-perm argument can be preceded by either a
+ or a
-. The man page for
find has this to say:
If the mode is preceded by a plus (“+”), this primary evaluates to true if any of the bits in the mode are set in the file’s mode bits.
Finding Files By Size
Perhaps my favorite of
find’s abilities: the
For fun, let’s learn which files are hogging Dropbox:
find ~/Dropbox -size +100M. What about files which are smaller than 10KB on our desktop?
find ~/Desktop -size -10k.
Note the difference in the trailing character on those last commands; uppercase
M specifies megabytes, whereas lowercase
k indicates kilobytes.
find’s size support goes from bytes all the way up to petabytes.
Finding Files By Type
Last of all,
find knows the difference between files and directories. For all directories greater than 1GB under the
~/Library directory (this may take a few seconds):
find ~/Library -size +1G -type d
-type f lets you specify files exclusively, with
s giving you the ability to find links and sockets respectively.
find allows you to not only specify which arguments you want to look for, but also those you do not want to look for.
Going back to the Markdown hunting earlier, try finding all files which aren’t Markdown:
find . ! -name *.markdown. By adding
! in front of an expression,
find negates it for you.
How about finding all Sass and CSS files in a project?
find . -name *.css -o -name *.scss uses the
-o (“or”) operator to find files across multiple name formats.
A fantastic new Capture The Flag contest from the security guys at Matasano, in conjunction with Square. This is a great playground for exploit development, and the tutorial is a lot of fun.
You can read the introduction blog post on the Matasano blog for more.
Over the last few years, the number of conferences for Objective-C developers has grown like crazy. They are a fantastic way to learn, giving you the opportunity to hear about some topics you may never have encountered before from people who know them inside and out.
Often, these conferences will sell high-quality videos of their talks, or even give them away for free. This list aims to collect videos from some of the best conferences out there.
WWDC is an obvious but essential addition to the list. The sessions are extremely well-produced and cover a diverse range of topics (there was even a session on kernel extension development at WWDC ‘13).
Apple has really raised the bar with their videos in recent years, particularly with availability. It took almost two weeks for session videos from WWDC 2011 to become available. WWDC '13 videos were ready in less than 24 hours after their respective sessions had ended.
You can watch the 2013 session videos from the free WWDC app on iOS or download them directly from Apple’s developer videos page.
NSConference is the next best thing to WWDC itself (perhaps except altWWDC). The speakers at NSConference are some of the most knowledgable in the business, with some who have been in the Mac software industry since before NeXTSTEP was acquired, and others previously at Apple itself.
The NSConference 5 videos are available for purchase.
The Çingleton sessions focus on the big picture rather than in-depth technical information, but they’re still just as interesting. If you have any interest at all in becoming a better software developer in general, check these out.
360|iDev, despite the awkward name, has some of my favorite talks on the list. In addition to great technical information, they have a number of sessions covering the business side of development, such as freelancing and customer support.
You can get the videos from 360|iDev 2013 for free on Vimeo.
Swipe is one of the newer conferences on the list, but they have had some fantastic speakers so far.
Unfortunately, videos of the latest sessions don’t seem to be available, but you can watch their older events for free on Vimeo.
One More Thing
Another Australian conference, One More Thing balances its sessions between iOS development and design. The videos are of superb quality and absolutely worth watching.
Videos from their past events can purchased on their website.
UIKonf is a European conference for iOS developers, held annually in the heart of Germany.
The videos from UIKonf 2013 are available for free.
Objective-Cologne, another Germany-based conference, offers their 2013 session videos for a small price. Their 2012 sessions can be downloaded for free from Gumroad.
CocoaHeads is “a group devoted to discussion of Apple Computer’s Cocoa Framework for programming on Mac OS X (including the iPhone)”. They are a fantastic event for anybody who can make it to one (if you can’t, consider starting your own!).
I couldn’t find a single page containing all of the videos from the different CocoaHeads chapters, but a search for CocoaHeads on Vimeo turned up quite a few.
Seattle Xcoders is a regular meeting of Mac and iOS developers from around the Seattle area. Recently, they have begun adding recordings of some of their speakers.
There are only a handful of videos available right now, but this is one to keep an eye on.
reddit has always had a massive nerd audience. /r/programming has a subscriber base of nearly half a million, and there are countless other subreddits dedicated to the art of software development.
Despite the interest from developers, there has never been a lot of activity around reddit’s API (for those who don’t know Python, at least), especially not compared to the likes of Twitter and Facebook.
I’m thrilled to be able to finally show off RedditKit, a pair of libraries for communicating with the reddit API, available in Ruby and Objective-C.
RedditKit is a project designed to make working with reddit’s API as painless as possible. With well-documented and dead simple codebases, RedditKit takes a lot of the hard work out of building software around all that reddit has to offer.
- Documentation. RedditKit’s libraries are completely documented and always up to date.
- Error handling. Error messages from reddit’s API are often tricky to work with. RedditKit takes any errors and passes them to you in a consistent and straightforward manner.
- API coverage. RedditKit covers as much of the API as possible, giving you access to everything from multireddits to wiki editing.
The Objective-C component of RedditKit is built atop AFNetworking 2 and Mantle. It is available on iOS 7.0+ and Mac OS X 10.9+.
You can get detailed installation instructions, sample code, and more from its repository on GitHub.
RedditKit.rb uses Faraday under the hood, allowing you to add your own middleware to modify requests and reponses as needed. Ruby 1.9.3 and above are supported.
For more, check out the project’s GitHub repository.
Let me know what you think about RedditKit either via Twitter or email.