Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Nano

...

nano /filedirectory/filename
Nano is a modeless editor, meaning once you have opened a file you can type to add text to it. There may be times when you need to turn off line wrap to ensure there are no formatting issues.
To disable wrapping on long text lines:

...

es una herramienta que puede utilizar para modificar o crear archivos dentro de SSH. Es de gran utilidad para editar y crear archivos.


Nano es un editor de texto fácil de usar, simple, que mejora las funciones y la facilidad de uso del editor de texto  Tiene una GUI (interfaz gráfica de usuario) fácil que permite a los usuarios interactuar directamente con el texto.


...

Trabajar con el editor de texto nano


Cuando tiene un archivo abierto con nano, hay comandos que lo ayudarán a encontrar, editar o guardar contenido. 

Su sintaxis es de la forma:

nano [opciones]  archivo_a_editar


   1. Para crear y abrir un nuevo archivo.


UI Text Box
sizemedium
typetip
$nano nuevo_archivo


Image Added


El comando anterior abrirá un nuevo archivo, en caso de que el archivo ya exista, se abrirá el mismo . En la parte inferior de la ventana, hay una lista de teclas de acceso directo para nano.



2. Para guardar un archivo.


UI Text Box
sizemedium
typetip
Presiona Ctrl + o





Tan pronto como presione la tecla enter, entonces en caso de que haya cambiado el nombre del archivo, se guardará el archivo con un nuevo nombre y si no, entonces se guardarán los cambios en el archivo actual.











Para obtener más comandos que se pueden usar al utilizar la utilidad nano, use el siguiente comando para obtener una lista completa de características.

To exit:

CTRL+x

To save after modification, exit with the above command and enter "y" when prompted.
To cancel any modification, exit with the above command and enter "n" when prompted.
If creating a new file, upon running the above command you will also be prompted for a file name. Enter the desired file name to create the file.
To cut a single line:CTRL+k To paste a line:CTRL+u To search for items:CTRL+w To save without exiting:CTRL+o Justify current selected paragraph:CTRL+j Insert a file into the currently selected one:CTRL+r Move to previous screen:CTRL+y Move to next screen:CTRL + v Display cursor:CTRL+c Invoke spell checker:CTRL+t For further commands that can be used when utilizing the nano utility, please use the following command to pull up a full list of features.
To pull up nano help page:

CTRL + g