Open TextEdit from command line on Mac OS X 10.6 Leopard

I found other articles online which mention editing ~/.bash.rc and ~./bash_profile but these are more work than necessary.

Simply use:

open -e [filename]

However, I noticed this functionality has some limitations concerning the files edited.

After trying the following commands on a secure file, it still would not save after making changes.

sudo open -e [filename]

sudo chmod 777 [filename]
sudo open -e [filename]

sudo chown -R [currentusershortname]:staff [filename]
sudo open -e [filename]

open -e [filename]

If you run into this issue where you cannot save after opening the file or any others with TextEdit, an awesome alternative and what I ultimately used is the tried and true vi.

See my “vi keyboard shortcuts quick reference” article for more info.

vi keyboard shortcuts quick reference,


About Ronnie Diaz

Ronnie Diaz is a software engineer and tech consultant. Ronnie started his career in front-end and back-end development for companies in ecommerce, service industries and remote education. This work transitioned from traditional desktop client-server applications through early cloud development. Software included human resource management and service technician workflows, online retail e-commerce and electronic ordering and fulfillment, IVR customer relational systems, and video streaming remote learning SCORM web applications. Hands on server experience and software performance optimization led to creation of a startup business focused on collocated data center services and continued experience with video streaming hardware and software. This led to a career in Amazon Prime Video where Ronnie is currently employed, building software and systems which stream live sports and events for millions of viewers around the world.

Posted on April 14, 2011, in Programming & Development and tagged , , , , , , , , , , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: