Results 1 to 8 of 8
  1. #1


    Member Since
    Nov 15, 2009
    Location
    california
    Posts
    5
    Specs:
    iMac G5
    Using Terminal and vi
    If anyone could assist I would greatly appreciate it...

    I am taking a class at community college, "UNIX using Linux" and using Terminal in order to run my scripts. I created a .html file in vi and was instructed to open the file in a web browser to see the web page. However, I cannot find the file I created in order to open it in a web browser.

    Where should I be looking for the file?

    Thanks

  2. #2

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    where did you save it? If you didn't change directories it's very likely in your home directory which would be /Users/<username>

    But, I can't believe they've got you doing vi without introducing you to the pwd command. Open terminal, do a ls, and if you see the file, do pwd. If not... do..

    find / -name <filename>
    mike
    This machine kills fascists
    Got # ? phear the command line!

  3. #3


    Member Since
    Nov 15, 2009
    Location
    california
    Posts
    5
    Specs:
    iMac G5
    Well...they did teach pwd in the beginning of the book, but apparently I'm not retaining all the commands and how all this goes together...lol.

    Anywho...I connected to the school's server and did ls and I can see the file in the home directory, but I guess I'm still confused as to how to open it in a web browser...sorry...

    Thank you for the quick response

  4. #4

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    OhhhHH is this on your schools account? If so is there a public_html directory in your home directory? If there is, mv the file to that, chmod 755 the file and you should be able to access it.. typically via something like

    http://your.schools.domain/~yourusername

    Since you can use vi on your mac.. I was confused as to where you were talking about
    mike
    This machine kills fascists
    Got # ? phear the command line!

  5. #5


    Member Since
    Nov 15, 2009
    Location
    california
    Posts
    5
    Specs:
    iMac G5
    You ROCK!!!! Thank you sooooo much!!!

  6. #6

    leopard-user1's Avatar
    Member Since
    Jan 27, 2009
    Location
    New York, NY
    Posts
    531
    Specs:
    17" MacBook Pro, 2.5 GHz Intel Core 2 Duo Processor, 2 GB 667 MHz DDR2 SDRAM, not unibody
    And by the way what exactly does the "ls" command do?

    (from scienceteecher.com)
    17" MacBook Pro, OSX 10.6.2 Snow Leopard

  7. #7

    cwa107's Avatar
    Member Since
    Dec 20, 2006
    Location
    Lake Mary, Florida
    Posts
    26,841
    Specs:
    15" MBP, Core i7/2GHz, 8GB RAM, 480GB Crucial M500 SSD
    Quote Originally Posted by leopard-user1 View Post
    And by the way what exactly does the "ls" command do?
    It shows the directory contents. Similar to the 'dir' command in DOS.

    Anytime you want to find out what a UNIX command does, type 'man <command>'. In this case, you'd type:

    Code:
    man ls
    And you'd get:

    Code:
    LS(1)                     BSD General Commands Manual                    LS(1)
    
    NAME
         ls -- list directory contents
    
    SYNOPSIS
         ls [-ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1] [file ...]
    
    DESCRIPTION
         For each operand that names a file of a type other than directory, ls
         displays its name as well as any requested, associated information.  For
         each operand that names a file of type directory, ls displays the names
         of files contained within that directory, as well as any requested, asso-
         ciated information.
    
         If no operands are given, the contents of the current directory are dis-
         played.  If more than one operand is given, non-directory operands are
         displayed first; directory and non-directory operands are sorted sepa-
         rately and in lexicographical order.
    
         The following options are available:
    ...and if you hit the space bar, it will go on to list all of the arguments.
    Liquid and computers don't mix. It might seem simple, but we see an incredible amount of people post here about spills. Keep drinks and other liquids away from your expensive electronics!

    https://youtu.be/KHZ8ek-6ccc

  8. #8

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    or the arrow keys, since man uses 'less' to display the file contents
    mike
    This machine kills fascists
    Got # ? phear the command line!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Month in Terminal is in Russian - only in Terminal!
    By yoandrew in forum OS X - Operating System
    Replies: 4
    Last Post: 12-29-2012, 10:20 AM
  2. Terminal Help?
    By gts1117 in forum OS X - Operating System
    Replies: 2
    Last Post: 08-20-2012, 10:25 AM
  3. Terminal Help
    By LMCLUMD in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 06-15-2011, 05:08 AM
  4. help!! terminal os 10.5.8
    By alcohol in forum OS X - Operating System
    Replies: 10
    Last Post: 04-10-2011, 01:35 PM
  5. using terminal
    By mayflyTR in forum OS X - Operating System
    Replies: 3
    Last Post: 08-22-2010, 06:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •