How to open "Unix" files in "OS X" apps?

Discussion in 'Apple' started by Keep it to Usenet please, Mar 25, 2005.

  1. Is there a way to open text files that are part of the BSD subsystem
    using regular old OS X apps? I'd love to be able to edit crontab,
    make.conf (I've installed Gentoo OS X), but I can't navigate to the
    Unix directories in the Open Dialog boxes, and the Finder's Find...
    won't find them either.
     
    Keep it to Usenet please, Mar 25, 2005
    #1
    1. Advertisements

  2. Keep it to Usenet please

    Leo Dekeo Guest

    If those files are located in folders invisible in the Finder, then you
    can access them by installing TinkerTool (a very handy program) or by
    using the Terminal and using the 'open' command (see the man page ('man
    open')).
     
    Leo Dekeo, Mar 25, 2005
    #2
    1. Advertisements

  3. Keep it to Usenet please

    Tom Stiller Guest

    Get the no-cost "TextWrangler" from Bare Bones Software
    <http://www.barebones.com/products/textwrangler/index.shtml>. Its File
    menu has an "Open HiddenŠ" option which will allow one to navigate to
    all those places where one shouldn't go.
     
    Tom Stiller, Mar 25, 2005
    #3
  4. Other people have made good suggestions. I just happen to have
    recently dealt with a similar problem. I found the following
    Applescript on macosxhints.com (here is the thread there:
    http://www.macosxhints.com/article.php?story=20030409015020645).


    It restarts the finder and you can choose to have the finder show
    hidden files or not show hidden files. I find it quite convenient.
    After using this, "." configuration files show up as do /etc and
    things like that.


    tell application "Finder" to quit
    display dialog "Show Hidden Files..." buttons {"ON", "OFF"} Â
    default button 3
    copy the result as list to {buttonpressed}

    try
    if the buttonpressed is "OFF" then do shell script Â
    "defaults write com.apple.finder AppleShowAllFiles OFF"
    if the buttonpressed is "ON" then do shell script Â
    "defaults write com.apple.finder AppleShowAllFiles ON"
    end try

    tell application "Finder" to launch
     
    Doug Anderson, Mar 25, 2005
    #4
  5. Keep it to Usenet please

    ZnU Guest

    Or you can just use the 'Go to Folder...' command in the 'Go' menu. Just
    type e.g. /etc in the box.
     
    ZnU, Mar 25, 2005
    #5
  6. Keep it to Usenet please

    D P Schreber Guest

    That lets you get there in the Finder, but not from a file dialog. For
    the latter do this:

    - Use Go to Folder, as described above, in a Finder window

    - Drag the folder icon from the title bar into the side panel

    From then on it will be accessible in file dialogs.
     
    D P Schreber, Mar 25, 2005
    #6
  7. Keep it to Usenet please

    Tom Stiller Guest

    I have defined an alias, roottext as:
    sudo /Applications/TextWrangler.app/Contents/MacOS/TextWrangler &
    for those rare occasions when I need to edit files owned by the root.
     
    Tom Stiller, Mar 25, 2005
    #7
  8. Keep it to Usenet please

    Per Rønne Guest

    Why not just use emacs?

    http://www.macbruger.dk/download/Emacs.app.sitx
     
    Per Rønne, Mar 25, 2005
    #8
  9. Hi,


    In most Cocoa apps (eg: TextEdit), you can type "/" (A single slash), in
    the "Open file" dialog. This will bring a "Go to" box, and you can go
    anywhere (eg: /etc/).
     
    Bruno Gaufier, Mar 25, 2005
    #9
  10. Keep it to Usenet please

    Tom Stiller Guest

    If you're *saving* a file, but not if you're opening it for input.
     
    Tom Stiller, Mar 25, 2005
    #10
  11. Because real men use vi

    (sorry, I forgot this isn't /. :) )
     
    Carl Witthoft, Mar 25, 2005
    #11
  12. Keep it to Usenet please

    Rich Siegel Guest

    Don't do that. Aside from being ill-advised, it's also unnecessary.
    TextWrangler (and BBEdit) support "authenticated saves", so if you want
    to save a file that you wouldn't otherwise permissions to modify, you
    are prompted for your admin password when you save. Try it. :)

    R.
     
    Rich Siegel, Mar 25, 2005
    #12
  13. Keep it to Usenet please

    Per Rønne Guest

     
    Per Rønne, Mar 25, 2005
    #13
  14. They use ed.
     
    Axel Hammerschmidt, Mar 25, 2005
    #14
  15. Keep it to Usenet please

    ZnU Guest

    Or, don't bother with the file dialog. Just drag the file you want to
    open to the app's Dock icon. If it doesn't think it can open it (because
    it has no file type or whatever), hold command-option while dragging,
    and it'll try to open it anyway.
     
    ZnU, Mar 26, 2005
    #15
  16. Keep it to Usenet please

    ZnU Guest

    Nah, it works when opening as well.
     
    ZnU, Mar 26, 2005
    #16
  17. Keep it to Usenet please

    Bob Harris Guest

    If you do not want to use vi, Vim, Emacs, pico, etc... from the command
    line, then may I suggest getting a copy of:

    TextWrangler
    http://www.barebones.com/index.shtml

    which is a fairly good general purpose editor that can deal with Mac,
    DOS (aka Windows), and UNIX text files.

    Bob Harris
     
    Bob Harris, Mar 26, 2005
    #17
  18. Keep it to Usenet please

    Tom Stiller Guest

    Right you are. Since there was no editable field in the Open dialog, I
    never thought to try just typing "/". Thanks.
     
    Tom Stiller, Mar 26, 2005
    #18
  19. Keep it to Usenet please

    Tom Stiller Guest

    I didn't know that. Thanks.
     
    Tom Stiller, Mar 26, 2005
    #19
  20. Keep it to Usenet please

    Per Rønne Guest

    For editing?
     
    Per Rønne, Mar 26, 2005
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.