I made some changes to my .profile which corrupted the Terminal app. I can launch terminal but I no longer get a prompt. I can't show hidden files in order to delete the .profile or .bashrc files.

How do I go about showing hidden files without using the terminal?

link|improve this question
Can you execute commands? Try running something like echo test and see if the command works. – Wuffers Jun 28 '11 at 19:24
I edited your question's title, as it didn't match the actual question at the end of your post. You can revert if you disagree. – Daniel Beck Jun 28 '11 at 19:37
@Mark - I wasn't able to execute commands at all. I even wrote a script to do this: defaults write com.apple.finder AppleShowAllFiles TRUE (with #!/bin/sh) but it wouldn't execute for some reason. @Daniel sweet, thanks. – upbeat.linux Jun 29 '11 at 6:00
You need to mark these files executable (chmod +x) first. If you want Terminal to open them, give them a .tool extension. // Consider accepting an answer, since your problem seems to be solved. – Daniel Beck Jun 29 '11 at 6:32
feedback

4 Answers

up vote 6 down vote accepted

Press Cmd-Shift-. in an Open File dialog. This'll show hidden files and folders. Open your broken files, and edit them e.g. in TextEdit or the plain text editor of your choice.

In the same file dialog, you can press Cmd-Shift-G to go to a specific folder, which is useful for all those hidden Unix folders like /etc.

link|improve this answer
Sweet: one of my initial annoyances was being unable to simply and intuitively expose the Unix system files. A bit of perseverance, research, and of course superuser and everything is golden. This experience will be more enjoyable. I'm so used to transferring my key shortcuts and .bash* files from Linux box to Linux box. Thanks again! – upbeat.linux Jun 29 '11 at 6:03
feedback

You can use secrets.prefpane to show hidden files in Finder and a lot more.

http://secrets.blacktree.com/

link|improve this answer
Thanks Somantra. I'll have to check this out. I haven't used a Mac in close to 10 years and was a bit frustrated that it wasn't out of the box hack friendly as my Linux boxes. This is an extremely helpful site! – upbeat.linux Jun 29 '11 at 5:55
feedback

I'd create another user account, then login as that account, and get admin privileges via "sudo" and use that to modify your hidden files in question.

link|improve this answer
This was another option that worked for me. I tested a few of the responses and they've I've been able to recreate and solve my issue with each. Thanks White Phoenix! – upbeat.linux Jun 29 '11 at 5:56
Heh, someone down voted this answer today. How random. – Doc Jan 4 at 23:47
feedback

All the responses are great ways of solving the same issue. I replicated my issue and tested each.

BTW, my resolution was to change the default terminal shell to /bin/sh. Then in TextWrangler overwrote .bash_profile and .profile with a blank file. Logged out and then back in.

Thanks everyone.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.