OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: Petra on April 25, 2006, 08:57:46 am

Title: How To Edit A File In Terminal
Post by: Petra on April 25, 2006, 08:57:46 am
Hello,

I'm a newbie using Terminal on the C3100.

In many How-To's the writer assumes that I should have enough experience in bash/sh and editing text files from the Terminal.
I've searched the internet and this user group for days but I still don't understand editing text files from Terminal or bash/sh stuff.

Please, can someone explain to me how it works?
Or perhaps do you have links to simple websites so I can learn it?

Thank you veeeeery much  

Petra
Title: How To Edit A File In Terminal
Post by: alijames on April 25, 2006, 09:47:21 am
Quote
Hello,

I'm a newbie using Terminal on the C3100.

In many How-To's the writer assumes that I should have enough experience in bash/sh and editing text files from the Terminal.
I've searched the internet and this user group for days but I still don't understand editing text files from Terminal or bash/sh stuff.

Please, can someone explain to me how it works?
Or perhaps do you have links to simple websites so I can learn it?

Thank you veeeeery much   

Petra
[div align=\"right\"][a href=\"index.php?act=findpost&pid=124490\"][{POST_SNAPBACK}][/a][/div]

Hi,

You can use 'vi'

Just type 'vi <filename>'

Key commands etc can be found via googling for 'vi commands'

Or if you prefer a GUI type editor, try Zeditor.

Cheers,

Alistair

SL-C3100 + Cacko 1.23
Netgear WLAN
Pharos LAN
Title: How To Edit A File In Terminal
Post by: bluedevils on April 25, 2006, 10:12:24 am
The main new concept with using vi is that there are two modes.  edit mode and command mode.  Edit mode is when you whatever you type goes into your document and command mode is when whatever you type is used to position curser, enter into edit mode, delete characters, save the file, exit...

The cancel button on the zaurus acts as the esc button on a normal keyboard and will always exit you from edit mode back into command mode.
Title: How To Edit A File In Terminal
Post by: Meanie on April 25, 2006, 10:17:21 am
just install pico. it's like the old DOS edit program  much easier to use than vi, but then again, not as powerful
Title: How To Edit A File In Terminal
Post by: bluedevils on April 25, 2006, 10:22:23 am
and vi is the default editor on many *nix systems including the Z.  The sooner you learn the basics of vi, the better you will be in the long run.
Title: How To Edit A File In Terminal
Post by: uth on April 25, 2006, 10:25:54 am
My personal favorite editor is 'jed'.  I'm going to have to compile it for the Z and post it one of these days.

jed is sort of a light-weight emacs clone.   It features color syntax highlighting, and also has a menu accross the top so you don't need to remember the emacs key-strokes.

The two-mode concept of vi drives me nuts.  Can't tell you how many text files I screwed because I forgot that I wasn't in edit mode.    

Quote
and vi is the default editor on many *nix systems including the Z. The sooner you learn the basics of vi, the better you will be in the long run.

I agree it's worth learning vi, since it's always going to be available when nothing else is.  That doesn't mean you have to like it.    
Title: How To Edit A File In Terminal
Post by: jfv on April 25, 2006, 10:35:09 am
The reason this information is not easily found on this forum and why perhaps the OP did not find it on the web is because it is not Zaurus specific but common to all Linux (indeed Unix) systems. Searching on google for linux basics or linux introduction is likely to produce thousands of hits.

Felipe
Title: How To Edit A File In Terminal
Post by: bluedevils on April 25, 2006, 10:54:42 am
And that is the truth.  On my linux boxes I usually use kwrite for things (fluxbox menu config) that I edit often and use alot of cut and paste.

Quote
I agree it's worth learning vi, since it's always going to be available when nothing else is.  That doesn't mean you have to like it.   
[div align=\"right\"][a href=\"index.php?act=findpost&pid=124513\"][{POST_SNAPBACK}][/a][/div]
Title: How To Edit A File In Terminal
Post by: Cresho on April 25, 2006, 01:46:57 pm
now if you really don't want to mess with the terminal and preffer an editor instead, just install either

zeditor_3.2.2english_arm.ipk
hold icon down for a few seconds to open a pop up window and check "execute with root privilege" remove checkmark magnify.  when you start it up, change the font size. and now you can edit your files like in notepad.

or you can also use
simple-edit_1.0.3_arm.ipk
hold icon down for a few seconds to open a pop up window and check "execute with root privilege" and use the pull down to "view all files" when you search and it will allow you to view all files in directories and you can pretty much edit anything.
Title: How To Edit A File In Terminal
Post by: bam on April 25, 2006, 02:55:27 pm
simple edit is really, really nice, I had a segfault occur with pico running with sudo, so I switched to nano, wich to me looks the same. vi's dual mode, is a bit of a pain, no way of telling where the hell your at.
Title: How To Edit A File In Terminal
Post by: Petra on April 25, 2006, 04:38:29 pm
Thanks to you all!
This helps me a lot.