Using Terminal to edit Hosts
This is probably a really basic question but I cannot seem to find the answer.
I wanted to add a local hosts entry so that I can see a Server which does not have a dns entry without having to use the ip address.
I have worked out where the hosts file is \private\etc and have finally managed to work out how to use VIM.
However - when I try to save the hosts file after editing it says it is read only.
I cannot work out how to change this - and if possible how to put back afterwards.
Thank you.
Macbook Pro 2.0 Mac OS X (10.4.5)
That file is owned by root, so you would have to edit and save it with root privileges. The easiest way to do this is to start vim using sudo ("su" stands for "super-user", so "sudo" refers to doing something as super-user, or root):
sudo vim [filename]
It will prompt you for your password, then you should be able to edit the file.
BE CAREFUL with sudo - root access essentially gives you the ability to do anything to anything on your system, and you can inadvertently edit files that will render your system unusable (like deleting the kernel).
P.S. Always make a copy of the file first. Then if you mess it up, you can copy back the original.
Similar Messages
-
On this page:http://www.adobe.com/inspire/2013/12/in-browser-editing-muse.html, it says you must use Adobes hosting. On this page: https://helpx.adobe.com/muse/using/in-browser-editing-websites-third-party-hosting.html, it indicates you can purely from the title. Which is it?
Hi Bob,
I found out how to do it, you drag the bounding box of the image container or rectangle to the edge of the browser boundary - as in the gray area around the edge - it snaps to it and the edges of the container go red to show this, and when its previewed it spans 100% of browser width. This video from Lynda explains how:
Creating the header and the footer (Updated) from the Course Designing a Portfolio Website with Muse
I can't upgrade as I have windows vista and the new version doesn't run on Vista, don't really want to buy a new computer just to run the latest Muse!
Cheers! -
Can I use "In-browser editing" with my site hosted externally?
Hi
I have my own reseller account here in the UK. I designed and created my own CMS, but as I've designed my first site in Muse, I thought I'd give the "In-browser editing" facility a go.
Does this still work if my website is hosted externally, or do I have to pay for this feature if I wish to use it?
I've looked everywhere and can't find any information that to use "In-browser editing" is chargeable or can be used in conjunction with an externally hosted website.
Cheers
GlynnHi Both
Thanks for your replies.
Sanjit, Adobe could perhaps make this clear on this page http://www.adobe.com/uk/products/muse/features.html where it is listed as:
"In-browser editing
Let website owners make changes to the content of their live sites through a browser. Choose whether to merge changes with the original Adobe Muse files."
Perhaps it could say
"In-browser editing
Let website owners make changes to the content of their live sites through a browser. Choose whether to merge changes with the original Adobe Muse files. [ONLY available with Adobe Business Catalyst]"
or in the video if you click the title.
Cheers
Glynn -
In lion trying to edit host file but it will accept my password, typing will not work.
Thanks
TonyIf you're using sudo in the Terminal, it is recognizing your keystrokes even though it might appear it's not.
(70759) -
friends: i want to try and install final cut pro HD 4.5 on my macbook air 11 inch running 10.7.2 (if possible). this same program is running great on my other macbook air 11 inch using a slightly earlier OS X (Lion?). 10.7.2 as you know does not support 10.7.2, but i have heard that sometimes it is just the installer that needs the powerpc so i am trying to install it via terminal. the problem is, i do not know how to configure my string properly. when i drop the .app into the terminal window i get this location:
/Users/mycomputername/Desktop/Final\ Cut\ Pro\ HD.app
and i was using variations of this:
sudo installer -package /Users/mycomputername/Desktop/Final\ Cut\ Pro\ HD.app -target /
try not to laugh, i am not a coder, just trying to get my computer to run this program that i love. the new FCP is too expensive and i don't even like it. if you can assist me in creating the proper string i would be grateful. i know that someone was able to install final cut studio using this method.
thanks so much for your help!I do not use Final Cut Pro, but I play one on Television!
Here is a quote from Wikipedia:
In April 2004, version 4.5 of Final Cut Pro was introduced and branded by Apple as "Final Cut Pro HD" due to its native support for Panasonic's tape-based DVCPRO HDformat for compressed 720p and 1080i HD over FireWire. (The software had been capable of uncompressed HD editing since version 3.0, but at the time had required expensive video cards and high speed storage.)
Any program written in 2004 would have been a PowerPC application. After Apple migrated all of its future Macs to the Intel platform in 2006, it included in OS X Tiger (and later Leopard, and optionally in Snow Leopard) emulation software that would allow most PowerPC apps to continue to run in Intel. This sofware was based upon technology that Apple licensed from a 3rd party and which Apple called Rosetta.
Apple's license to include Rosetta in newer versions of OS X expired with Lion and now Mt. Lion.
Hence no matter how well you use Terminal, or even Pacifist to install FCP 4.5, it just will NEVER run under Lion on your Mac.
If your MacBook Air 11" is old enough (2010, MacBookAir3,1) to boot and run Snow Leopard, you can either partition your hard drive or add an external hard drive and install Snow Leopard into it. You can then "dual-boot" into Snow Leopard when you want to run FCP 4.5 or into Lion when you need iCloud or otherwise.
Alternatively you can install Snow Leopard Server into Parallels 8 on any 11" MacBook Air and have FCP 4.5 running concurrently with Lion, such as here where the PowerPC app Appleworks is running on a Lion Mac:
[click on image to enlarge]
Apple is now selling Snow Leopard Server for $19.99 + sales tax & shipping costs at 1.800.MYAPPLE (1.800.692.7753) - Apple Part Number: MC588Z/A (telephone orders only).
Parallels offers a 14 day free trial download from its website. It sells retail for $79 but can be found for a discount on the internet.
NOTE: You are confusing your version with Final Cut Express 3.5 and Final Cut Studio 2, both of which will run in Lion, but whose installers have problems in Lion and Mt. Lion due to a "bug" in the installer program. For those versions, as pointed out in Jeremy Johnstone's blog, using Terminal (or alternatively, using Pacifist) to install will achieve success in using those versions in Lion. -
How to edit host file...
I have ICS on my SK17i . I want to edit my /etc/host file. How is it possible.
Solved!
Go to Solution.Since host file is a system file
You need to root your phone and then use root explorer > mount R/W > open with text editor
May i know what actually you want to do ?
Why do you want to edit host file ?
Discussion guidelines.
Message me or any other moderator to seek help regarding moderation. -
What is command in terminal to see host in my LAN?
I want to see all the host in my LAN with there IP address and MAC address. Is it possible using terminal command window? If it is, what is command in terminal to see it? If not, is there any other method to do this?
If you want to a more detailed set of counters, the command is "sh controller ethernet <BLAH>".
Please don't forget to rate our useful posts. -
[Solved] How to set Code::Blocks to use Terminator!
Hello All,
I've recently just gotten into using an IDE to develop teh 1337 codez.
Ignoring my silliness, I noticed that I can customize C::B to use whichever terminal emulator I like but I'm having trouble with using terminator.
I've tried the following in the Settings :
/usr/bin/terminator -t $TITLE -e
terminator -t $TITLE -e
terminator $TITLE
And none of these have worked. Anyone have any suggestions? And yes, terminator is in my /usr/bin directory as evidenced by the output of "which terminator", which is /usr/bin/terminator
Edit: Nevermind, I did it! Yay! Wanna know what worked? It was this (for once a man page was useful to me) : terminator -T $TITLE -x
Last edited by MutantJohn (2013-08-23 23:30:39)There isn't a "code base" for java stored procedures ... that's an applet's issue.
for more details about java stored procedures
review teh java dev. guide and java stored proc guide located at :
OTN FORUM ENTRY --> Oracle 8.1.7 Java Online Documentation
http://technet.oracle.com:89/ubb/Forum18/HTML/001567.html
null -
Using terminal to connect to localhost:8888
I have mysql installed and im using terminal to connect to localhost:8888 but its not working
mysql -h localhost:8888 -u root
What am I doing wrong?
thanks in advanceI think you cannot ssh to your machine as root if you didn't enable the root user on your computer (it isn't enabled by default and you shouldn't, unless you have a very good reason to do so).
If you just need a webserver for local testing of webpages you can use MAMP. If you do, simply enter
/Applications/MAMP/Library/bin/mysql -u root -p
It then asks you for your password (root) and you're done (the mysql root user has nothing to do with your systems root user). You can also use phpMyAdmin from the MAMP startpage.
That's the way I do it here and it works flawlessly. The latest MAMP comes with PHP 5.2.6 and MySQL 5.0.41. Place your pages inside /Applications/MAMP/htdocs/someFolder and then you can access them via http://localhost:8888/someFolder. Use localhost:8889 as your MySQL host in your scripts with user root/password root.
Most paths in MAMP are hardcoded, so you have to install it in /Applications (or place an alias of the MAMP folder there).
Hope it helps.
Ralf. -
Resize partition using terminal - error:
I am trying to resize my osx partition so i can implement a triple boot. I have an 80gb drive in my macbook - osx uses 43.57GB out of 60GB and xp 20GB GB. I attempted to use this code in terminal:
diskutil resizeVolume disk0s2 56G "Linux" "Linux" 14G
then it says:
verifying
Resizing encountered error The underlying task reported failure on exit (-9972) on disk0s2 Macintosh HD
how should i attempt this? is my code correct?i took a look, and i believe that the program behind diskutil is hdiutil.
please correct me if im wrong.
in the terminal i typed
man hdiutil
and found resize as a command there:
*resize size_spec image*
Given a read/write partitioned UDIF, if the last partition is
Apple_HFS, attempt to resize the partition to the end of the
image, or to the last used block in the embedded HFS/HFS+
filesystem (depending on size_spec). resize is often used when
a device image needs to be shrunken so that the HFS/HFS+ par-
tition can be converted to CD-R/DVD-R format and still be
burned. Note that gaps cannot be reclaimed as resize does not
move data. -fsargs can sometimes be used to minimize filesys-
tem-generated gaps. resize can also be used to grow a
filesystem and image without bound.
hdiutil burn does not burn Apple_Free partitions at the end of
the devices, so an image with a resized filesystem can be
burned to create a CD-R/DVD-R master that contains only the
actual data in the hosted filesystem (assuming minimal data
fragmentation).
Common options: -encryption, -stdinpass, -srcimagekey, -shadow
with friends, and -plist.
Size specifiers:
-size ??b|??k|??m|??g|??t??p|??e
-sectors sector_count | min | max
Specify the number of 512 byte sectors to
which the partition should be resized. If
this falls outside the min/max values, an
error will be returned and the partition will
not be resized. min automatically determines
the smallest size the partition can be
resized to and uses that value. max automat-
ically determines the largest size to which
the partition can be grown and then uses that
value.
Other options:
-imageonly only resize the image file, not the parti-
tion(s) inside of it. This is the default
for UDIF images (more partitions can then be
added in the new free space).
-partitiononly only resize the partition(s) in the image
(including their embedded filesystems). This
is the default for NDIF images. For a newly-
created SPUD where the partition fills the
image, the partition can only be shrunk. If
there is an Apple_Free partition after an
existing partition, that partition can be
expanded into the space marked by the
Apple_Free. Shrinking a partition results in
a larger Apple_Free partition.
-partitionNumber partitionNumber
specifies which partition to resize (UDIF
only -- see HISTORY below). partitionNumber
is 0-based, but, per hdiutil pmap, partition
0 is the partition map itself.
-growonly only allow the image to grow
-shrinkonly only allow the image to shrink
-nofinalgap allow resize to entirely eliminate the trail-
ing free partition. Such an image restored
to a hard drive will not boot OS 9 nor will
it allow OS X to boot on old-world (beige)
machines.
-limits Displays the minimum, current, and maximum
sizes (in 512 byte sectors) that could be
passed given possible -imageonly or
-partitiononly flags. Does not modify the
image.
-oldlimits behaves like -limits except that it reports
the stretch sizes that OS X version 10.3
would have reported (useful if an image needs
to be used with asr(8) on an older system).
segment
++++++++++++++++++++
I still dont know what exactly to enter but now i feel like this could actually work using terminal. any help is appreciated -
How to remove Exif data using terminal
I want to remove Exif data from images using Terminal
I've googled and cant find anything
There's a Linux command, but nothing fro Terminal - or at least I cant find
Thanks
Omar@Frank Caggiano, thanks. i only want to remove and not do anything else. exiftool allows u to write as well
my ideal solution: not to install anything
that's something that comes from windows: fearing that installing things will clog up ur system. lol
i need imagemagik for other image editing anyway
thanks for the replies -
Empty the trash using Terminal on install DVD?
iMac doesn't boot up - stuck on grey screen with spinning wheel, tried all the suggestions.
Thought a reinstall of Snow Leopard using the Install DVD would work. And of course I don't have enough space to do so...
This is what I have so far using Terminal via the install disc:
cd /Volumes
ls
.Trashes Mac OS X Install Disc 1 Macintosh HD
cd "Macintosh HD"
It then brings up all the files on my Mac HD but I'm not sure where to find the Trash and how to empty it :/
Apparently I can also install and boot from a USB but I'm not sure how that works either... help me pleaseI'd suggest getting an external hd. Install the os to the external hd. Do it this way you are less likely to loose your valuable data.
You need
ls -a
to see hidden files. I do
ls -laF
to remove a empty directory you need
rmdir
to remove a file you need
rm
The files are not recoverable. All deletes are final.
I recommand
rm -i
Here is an overview of the terminal commands. Lets assume that your account has a short user name of mac.
Macintosh-HD -> Applications -> Utilities -> Terminal
#What is my short user name? Type the whoami command.
mac $ whoami
mac
mac $
#How to list all of your disks.
# The ls command is for list
mac $ ls /Volumes/
Audio CD Macintosh-HD Spotless Tiger-ext
mac $
# Let's say your flash drive is named Spotless
# cd is change directory
mac $ cd /Volumes/Spotless
# pwd is Print Working Directory. A directory is the Unix name for a folder. You are always in a directory.
mac $ pwd
/Volumes/Spotless
mac $
# The ls command is for list
# l is long
# F is type of file where / is directory. For directories, the slash is pasted to the end of the name.
mac $ ls -lF
total 134704
-rw-r--r-- 1 mac staff 64560 Mar 3 2009 A-picture-of-Youpi-key.png
drwxr-xr-x 83 mac staff 2822 Nov 7 14:52 Applescript files/
drwxrwxrwx 12 mac staff 408 Dec 13 2008 Christmas Cards/
drwxr-xr-x 9 mac staff 306 Dec 21 17:39 Christmas Cards 2009/
... trimmed ... What does all this mean?
drwxrwxrwx
d = directory
r = read
w = write
x = executeable program
drwxrwxrwx
|| | |
|| | all other users not in first two types
|| |
|| group
||
|owner
|
What type of entry is this? d = directory, - = file, etc.
Every Unix resource: files, folders, etc has an owner, group, other
A Unix resource has one owner.
A Unix resource has one group. A group contains a list of users.
To gain access to a file, you can be the owner, in the group, or not the owner and not in the group hence you end up as other. The owner, group, or other has read, write, or execute permissions.
# l is long
# a is all to show hidden files & folders
mac $ ls -lFa
total 134736
drwxr-xr-x 41 mac staff 1496 Dec 22 17:11 .
drwxrwxrwt 8 root admin 272 Dec 24 13:55 ..
-rwxrwxrwx 1 mac staff 15364 Dec 23 12:52 .DS_Store*
drwx------ 4 mac staff 136 Jan 22 2009 .Spotlight-V100
drwxrwxrwt 5 mac staff 170 Sep 14 16:36 .TemporaryItems
d-wx-wx-wx 4 mac staff 136 Dec 31 1969 .Trashes
-rw-r--r-- 1 mac staff 64560 Mar 3 2009 A-picture-of-Youpi-key.png
drwxr-xr-x 83 mac staff 2822 Nov 7 14:52 Applescript files
drwxrwxrwx 12 mac staff 408 Dec 13 2008 Christmas Cards
drwxr-xr-x 9 mac staff 306 Dec 21 17:39 Christmas Cards 2009
... trimmed ...
# mv is move or rename
mv -i the-name the-new-name
# You can just rename the file back to what it was with mv command.
mv -i old-name new-name
Here is what these commands mean:
cd is change directory
pwd is a print working directory
ls is list
sudo is Super user do
mv is move or rename
For cryptic comments, you can always uses the manual command which is man. For example:
man mv
# Type the letter q to quit.
In case you have spaces in your filenames or directories, you need to escape them. See examples:
mac $ ls -l ~/"see it"
-rw-r--r-- 1 mac staff 3171 Oct 26 23:38 /Users/mac/see it
mac $
mac $ cd /Users/mac/Desktop/ttt\ html\ copy/
Do you know about tabbing? Type in a few letters of a name then press the tab key. The computer will type out the rest of the name if it is unique.
Press the up arrow key to see the previous command(s).
To edit a command, use the left arrow key to more left and the right arrow key to move right. Use the delete key to delete the key to the left. Type a letter to insert.
history to see many previous commands.
mac $ history
1 pwd
2 man ls
3 history
You may copy then paste from this list.
http://discussions.apple.com/thread.jspa?threadID=2692161&tstart=0
Robert -
How to edit host file to fix error 3194
how do i edit the host file to solve the error 3194 problem?
Since host file is a system file
You need to root your phone and then use root explorer > mount R/W > open with text editor
May i know what actually you want to do ?
Why do you want to edit host file ?
Discussion guidelines.
Message me or any other moderator to seek help regarding moderation. -
Dear sir/madame,I have tried to use the inbrowser editing capability for Adobe Muse to login to my CMS. To login I have use the exact same FTP details I have used to upload my website, I even checked the page url multiple times but I keep getting the same error (the username and password are invalid for your FTP server. Please check them and try again). The hosting website (Yourhosting.nl) only has this one FTP user, which I cannot expand to more users. Can you please tell me if I am doing something wrong? The url to this page is http://e-divecollege.be/index.html or www.e-divecollege.be
Dear sir/madame,I have tried to use the inbrowser editing capability for Adobe Muse to login to my CMS. To login I have use the exact same FTP details I have used to upload my website, I even checked the page url multiple times but I keep getting the same error (the username and password are invalid for your FTP server. Please check them and try again). The hosting website (Yourhosting.nl) only has this one FTP user, which I cannot expand to more users. Can you please tell me if I am doing something wrong? The url to this page is http://e-divecollege.be/index.html or www.e-divecollege.be
-
Using terminal to uninstall program
I have instructions to uninstal a program using terminal commands...but it won't let me get to the directory were the uninstall program is:
cd /Library/Application Support/SecurID
It won't let me go to Application Support folder even though when I list files in the Library directory, it shows up?My question might not be clear....trying to get to Application Support folder using terminal and it won't let me.
Macintosh-3:Library Melissa$ ls
Acrobat User Data Favorites Printers
Address Book Plug-Ins FontCollections PubSub
Application Support Fonts Receipts
Assistants Icons Recent Servers
Audio Input Methods Safari
Autosave Information Internet Plug-Ins Saved Searches
Caches Keyboard Layouts Screen Savers
Calendars Keychains Sounds
ColorPickers LaunchAgents Spelling
ColorSync Logs Voices
Colors Mail iMovie
Compositions Mail Downloads iTunes
Cookies PreferencePanes
Documentation Preferences
Macintosh-3:Library Melissa$ cd Application Support
-bash: cd: Application: No such file or directory
Maybe you are looking for
-
Adding c# project dll to gac without visual studio(gacutil)
Orchestration project calls a method of c# library project. I tried to include the c# project dll in the itemgroup, but the btdf is failing saying the dll is missing. So I have created a setup project with the primary output taking the c# project, so
-
SAP Crystal report support Khmer Unicode
Hi Experts! i would like to ask how to make SAP Crystal report for SAP B1 support Khmer Unicode. it displays in wrong format. But it displays in right format in SAP Crystal XI release 2 for Microsoft Visual Studio. Thanks in advance.
-
Credit limit / Commitment limit issue?
As for customer and sales side, amount of sales order will be also account for credit limit/commitment limit. So what's the difference from aspect of BP as customer and sales side? Why must commitment limit be larger than credit limit?
-
Hello: Standard SAP does not clear (marked as cashed) payroll checks. I have a customized transaction that was recommended by an SAP OSS notes. It works great in the foreground, it cancelled when I try to run it in the background. Does anyone has b
-
Hello, I have a customer defined idoc, when it comes into the inbound queue it get's status 64 - "IDoc ready to be transferred to application", and a job is generated for the processing instead of just immidiate processing. It's important to mention