LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-21-2008, 03:20 AM   #1
shaiful
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
How to edit a HTML file in linux


Hi guys,

Need your help on this as i'm new to Linux. FYI, my website is hosted by a server running on Linux. I have to update the website where by i have to edit the html file in Linux.

I have tried to edit this publisher.htm file but it seems that my website is not showing just like what i have updated at the html file.

Ok my first question, once finish editing the html file, how do i save the html file?

Next question, what should i do once i finish saving the html file?

Thanks in advance guys. More questions to come guys, if it sounds stupid, pardon me.
 
Old 11-21-2008, 03:33 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Welcome to LQ!!

I assume that someone else set up this webpage. Regardless, tell us as much as you can about how it was set up, what publishing SW was used, etc. Also, post a link to the site.

The typical web page starts with a file named "index.html". This is typically sent to the server by ftp or some other protocol, and installed in the correct folder so that it will be found when you enter the site address. Many web publishing programs, editors, etc. have built-in utilities for uploading the files to the server, managing changes, etc.

An html file can be generated by a wide variety of editors--including many word processors. The one I prefer is Bluefish.

Saving a file is a function of the editor you use.

I think you will benefit from getting a book on web design. Any reasonable-sized bookstore will have a good selection, or go to Amazon.
 
Old 11-23-2008, 07:38 PM   #3
shaiful
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Hi Pixellany,

Appreciate your reply. This is quite urgent and yes it is done by someone else. Software: Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8.

Another question, can i edit the .htm file in the linux itself? Thanks.
 
Old 11-23-2008, 07:46 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Hi, I assume your using a command line interface? so the first thing that strikes to mind is Vi, It's a bit complicated tho but there are Vi guides around so I won't bother with it too much. It's also possible you might have Nano, that's easier to deal with then Vi in my opinion if you have it.

However it might be easier for some to just edit the website files on another computer and overwrite the pre-existing ones as necessary, means you can use things like revision control easier too and test things without having to overwrite your live files so to speak (you could also just copy the file and edit it else where but there can be security issues behind that with server side scripting languages like PHP and broken code). you could probably use SCP for this purpose to copy files securely to the server and then just move or copy them to where they need to be.

If you have a graphical user interface on the otherhand, there are also some editors within the application menu like kwrite for example.
 
Old 11-23-2008, 07:48 PM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
If you have some preferred editing software you can use 'wget' to download all of your web pages, do edits locally, then upload the pages to your server. Web pages are typically edited locally and then uploaded anyway. Editing the actual file which is in use would not be a good idea; what happens if someone goes to browse it while you're editing?
 
Old 11-23-2008, 08:01 PM   #6
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: My HDD...
Distribution: WinXP for designing, Linux for life.
Posts: 2,329
Blog Entries: 1

Rep: Reputation: 47
I'm an amateur website designer, and I used to take the trouble of running Dreamweaver through Wine, but with all the bugs that the two of them have together, I resorted to nano (or pico on some systems). Vi users, please don't flame me...but it would be easier to use nano or pico to edit your files than it would Vi. The only problem with a text editor like nano, pico, emacs, or vi, they don't show you broken syntax like Bluefish does (I think it does..) which is helpful when you aren't used to using HTML, PHP, or any other "languages" like that.
 
Old 11-23-2008, 08:38 PM   #7
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Have you tried the Mozilla editor ("Composer")?

If you use KDE you can use 'kate'; it even has HTML syntax highlighting. If you're more daring, use 'emacs' (has syntax highlighting and all sorts of goodies that rabid lisp-programming emacs lovers have created).

[edit] Oops ... this was @ phantom_cyph, not the OP
 
Old 11-23-2008, 08:52 PM   #8
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: My HDD...
Distribution: WinXP for designing, Linux for life.
Posts: 2,329
Blog Entries: 1

Rep: Reputation: 47
Quote:
Originally Posted by pinniped View Post
Have you tried the Mozilla editor ("Composer")?

If you use KDE you can use 'kate'; it even has HTML syntax highlighting. If you're more daring, use 'emacs' (has syntax highlighting and all sorts of goodies that rabid lisp-programming emacs lovers have created).

[edit] Oops ... this was @ phantom_cyph, not the OP
Haha. Nice. I did forget about kate, its a very good text editor for this if you use KDE. If you don't, you are out of luck. Does XFCE's mousepad do syntax highlighting? I don't think it does...
 
Old 11-23-2008, 09:46 PM   #9
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Quote:
Originally Posted by phantom_cyph View Post
Haha. Nice. I did forget about kate, its a very good text editor for this if you use KDE. If you don't, you are out of luck. Does XFCE's mousepad do syntax highlighting? I don't think it does...
Well, in XFCE you can still use emacs (or xemacs if you wish).
 
Old 11-23-2008, 10:31 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by shaiful View Post
Hi Pixellany,

Appreciate your reply. This is quite urgent and yes it is done by someone else. Software: Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8.

Another question, can i edit the .htm file in the linux itself? Thanks.
Linux is an operating system---the SW that actually does things is typically called an "application". For editing, there are a variety of choices, many of which have been discussed here already.

You can also do a Google search using something like "edit html linux".
 
Old 11-24-2008, 11:50 AM   #11
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
You can edit an HTML by any text editor or any application that allows for saving text files. To name but a few: gedit, kate, kwrite, open-office, bluefish, anjuta, etc.
Obviously it's better or at least easier to use a specific HTML editor (Bluefish for example).

In the end you have to copy your modified HTML file to the remote site. If you are wiorking on the server directly, either because your sitting physically in front of it, or you are using a VNC-client to access it, then you can modify the site contents directly.

Bookstores have tons of HTML guides. It really helps to have a few good ones in your hand during work. Something SAM's Teach Yourself books series.

Last edited by Tinkster; 10-30-2010 at 05:13 PM.
 
Old 11-24-2008, 12:36 PM   #12
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
Hi!

I would use vi. It is difficult at the beggining but when you get used to it, it is easier and faster than a GUI program.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs - html-helper-mode- edit template flebber Programming 3 12-12-2007 10:02 PM
help to edit Edit my bootloader's config file from kernel prompt jagdishpandey Linux - Kernel 5 07-03-2007 06:59 AM
allow users to edit /var/www/html/someFile blizunt7 Linux - Server 8 03-20-2007 07:50 AM
LXer: Decompile .chm file to view as html file under Linux LXer Syndicated Linux News 0 01-28-2007 01:03 AM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 05:06 AM


All times are GMT -5. The time now is 02:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration