How to look at files in Terminal?

Discussion in 'Mac Basics and Help' started by s97fever, Jan 22, 2013.

  1. macrumors newbie

    Joined:
    Jan 22, 2013
    #1
    I was told to delete /usr/local folder in order to fix a messed up install.

    But I'm not sure how to view the files first because I don't see a way to view such in Finder.:eek:

    If this can only be done via Terminal then what commands can I use to view the folders and files under another folder?

    Thank you in advance for any help!
     
  2. macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #2
    In Finder select Go > Go to folder and type in: /usr or whatever path you want.
     
  3. LPZ
    macrumors 65816

    Joined:
    Jul 11, 2006
    #3
    This seems rather drastic. What were you installing?

    You can list the folders and files inside a folder (ie, a directory) using the ls (lowercase LS) command. For example, to see what's in /usr/local, enter

    Code:
    ls /usr/local/
    in Terminal. I get

    Code:
    bin     etc     lib     man     share   texlive
    The first five directories are standard.
     
  4. thread starter macrumors newbie

    Joined:
    Jan 22, 2013
    #4
    Explaining why the delete

    I had a fail install on Homebrew and was trying to fix it.

    The first response was to delete that folder which obviously would not attempt to do at here:
    https://github.com/mxcl/homebrew/issues/14319

    The guy had recommended the following a little more below and it had worked for me:
    /usr/bin/curl -skSfL https://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1'

    But until your posts above I wasn't sure where the /usr folder resided.
    Even just using ls alone as a command it doesn't appear until you first do cd /.../....

    That's crazy! :confused:
     

Share This Page