How To Create A Text File On A Mac

Believe it or not, this is one of the most popular questions by which my blog is found by search engines. Also, for people coming from other operation systems, this is also one of the most important sources of frustration.

So, knowing that this particular topic is so hot, I thought it would be interesting to show you another way of creating text files on Mac OS, this time without Quicksilver. For those of you who don’t kow the original post, here is a more detailed description of using Quicksilver for creating text files, prepending or appending text to them.

The trick is basically a linux shell hack, which any normal linux user knows, or used in his days. But Mac OS users are not like Linux users, like I learned after one of my most commented posts on digg, so here’s the simple trick:

1. Start Terminal. I have it in the dock, because I am so used to it, but this is not the default setup. For those of you who don’t know where to find it, try “Applications / Utilities”, you’ll find it there.

2. Change your folder to the desired location for your future text file, let’s say by:

cd /Users/yourusername/Desktop/

if you want to create the text file on your Desktop. Of course, change “yourusername” with your real username on that Mac.

3. Issue this simple command:

echo “this line created with terminal” > filename.txt

The part between quotes will be the first line of your file, and the name of your file will be filename.txt.

Simple as a Mac.

P.S. If you think this was actually too simple, think at how you can make a best usage out of it when used in Automator for instance, as an intermediary shell action between two other commands. As a matter of fact, I’m just thinking right now of something like this. But more on that soon.

Tags: , , ,

If you feel like you want to give back something for what you received by reading this blog, you can always hit the "Donate" button. Rest assured that any amount is appreciated.

Or, if you fancy bitcoins, I can receive yours at this adress. Rest assured that even a satoshi will be appreciated.


9 Responses to How To Create A Text File On A Mac

Leave a Reply

  • *
  • *
  • Post Comment

    What is 12 + 6 ?
    Please leave these two fields as-is:
    IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

Open Connect Live Stream

Live every Thursday between 9:30 - 11:30 AM (EET, GMT+2) from Bucharest. Leran more about Open Connect.

The Ultimate Wordpress Framework

I use WPSumo on this very blog, not only because I was one of the founders, or because I actively maintain it, improve it and promote it, but because it's the best choice when it comes to a premium wordpress framework.

See for yourself

I Coded / Created

  • Open Connect - THE networking event for entrepreneurs.
  • WPSumo - the utlimate WordPress framework. This very blog is proudly built on it.
  • iAdd - time and task management on iOS (iPhone / iPod / iPad) using the Assess - Decide - Do framework

I Support

Copyright 2006 - 2012 © Dragos Roua | find me on Google+

Brilliantly Better | Natural Productivity - Assess, Decide, Do | iAdd for iPhone / iPad | 100 Ways To Live | Mirabilis Media NZ

Dragos Roua uses and recommends Appnor's managed hosting