[ubuntu-uk] Help needed with ssh

Matthew Wild mwild1 at gmail.com
Mon Jul 13 18:55:20 BST 2009

On Mon, Jul 13, 2009 at 6:29 PM, Paul Roach<roachy at roachy.net> wrote:

> Then you will have a console on the remote machine. From there, you
> can edit files using nano
> nano filename
> There are prompts at the bottom of the screen.
> When editing a file, it's recommended to copy the file first.
> cp file.txt file.txt.backup
> Then you can edit the file without worries...

Tip: Create a .nanorc file: nano ~/.nanorc
Write the lines:
    set backup
    set backupdir /home/yourusername/backups/nano

and save and exit. Obviously set the backupdir path to something which
exists, or make it.

Every time you save a file, a copy of the original will automatically
go into the backup directory you specified. This feature has saved me
multiple times :)

Some other options which I have in my .nanorc which make nano more comfortable:

set nowrap
set smarthome
set autoindent
set multibuffer
set smooth
set suspend

Apologies for going a little off the thread topic, but I figured these
might be useful, I find that even many people who use it daily don't
know that nano can be customised in these ways, so I like to spread
the knowledge. It can even accept mouse clicks... more help at "man 5
nanorc" :)


More information about the ubuntu-uk mailing list