View Full Version : Help a newbe use Terminal
January 8th, 2010, 04:29 PM
I know this is so basic but i don't know anything about unix. How do I find, open and edit a file on my computer using Terminal.
I need to access a file located: /users/bob/.ssh/known_hosts.
January 8th, 2010, 04:48 PM
Why do you need to use Terminal? You should be able to use Finder's Go to Folder command to go to ~/.ssh and see that file.
January 8th, 2010, 04:58 PM
You can use a UNIX text editor like vi, vim, emacs or nano.
You would type:
If the file needs to be edited as superuser (root), then you would prepend the above command with "sudo" and enter your administrator password when prompted.
Explaining exactly how to use those text editors is beyond the scope of this forum. A simple google search will get you going using any of these, though.
January 8th, 2010, 07:44 PM
you would prepend the above command with "sudo" and enter your administrator password when prompted.
Data Entry (http://globolstaff.com/) | Video Submission (http://globolstaff.com/video-submission.html) | Website Promotion (http://globolstaff.com/website-promotion.html)
January 9th, 2010, 05:57 AM
Here's an easy way to do what you need to do.
Download TextWrangler from http://barebones.com , it's a free download.
Once you have it and start it up let it install the command line tools or go to its prefs and tell it to install them.
Now to edit a file in some low level directory you can't normally get to from Finder you negotiate your way in Terminal to the directory you want to work in and simply type in edit somefilename
So to edit /users/bob/.ssh/known_hosts you can just type in:
or edit ~/.ssh/known_hosts which is a shortcut to your user directory.
The file will open in TextWrangler and you can edit it just like any other file.