103.1 Work on the command line

Description

Lecciones 1 y 2
Rolando Martinez
Mind Map by Rolando Martinez, updated more than 1 year ago
Rolando Martinez
Created by Rolando Martinez over 3 years ago
12
0

Resource summary

103.1 Work on the command line
  1. 1.- Key knowledge areas
    1. 1.- Use single shell commands and one line command sequences to perform basic tasks on the command line.
      1. 2.- Use and modify the shell environment including defining, referencing and exporting environment variables.
        1. 3.- Use and edit command history.
          1. 4.- Invoke commands inside and outside the defined path.
            1. 6.- Terms and Utilities
              1. bash echo env export pwd set unset type which man uname history .bash_history Quoting
            2. 2.- Introduction
              1. 1.-GUI interface
                1. 2.- Use of terminal
                  1. 3.-Shells
                  2. 3.-Getting System Information
                    1. 1.- $ pwd /home/frank
                      1. 2.- $ touch newfile $ ls newfile
                        1. 3.- uname -a
                        2. 4.- Getting Command Information
                          1. 1.- man
                            1. 2.- aproposc kernel
                              1. 3.- type uname cp kill which
                                1. -4.- $ which uname which /bin/uname /usr/bin/which
                                2. 5.-Using Your Command History
                                  1. 1.- $ history | grep bash_history
                                    1. 2.- ls /home/frank ls -a /home/frank
                                    2. 5.- Preguntas y REspeustas
                                      1. 1.- Utilice el sistema man para determinar cómo decirle a apropos que envíe un comando breve para que solo envíe un mensaje corto de uso y luego salga.
                                        1. man apropos
                                          1. options
                                            1. --usage
                                        2. 2.- Utilice el sistema man para determinar qué licencia de copyright se asigna al comando grep.
                                          1. Ejecute man grep y desplácese hacia abajo a la sección “Copyright” del documento
                                          2. 3.- Identifique la arquitectura de hardware y la versión del kernel de Linux que se utiliza en su computadora en un formato de salida fácil de Interpretar.
                                            1. man uname uname -v uname -i
                                            2. 4.- Imprima las últimas veinte líneas de la base de datos dinámica history y el archivo .bash_history para compararlos
                                              1. $ history 20 $ head -n 20 .bash_history
                                                1. 5.- Utilice la herramienta apropos para identificar la página man donde encontrará el comando que necesitará para mostrar el tamaño de un dispositivo de bloque físico conectado en bytes en lugar de megabytes o gigabytes.
                                                  1. $ apropos block $ man lsblk $ lsblk -b
                                              2. 6.- Finding Your Environment Variables
                                                1. 1.-$ env
                                                  1. 2.- echo $PATH
                                                    1. 3.- Creating New Environment Variables
                                                      1. myvar=hello
                                                        1. echo $myvar
                                                          1. export myvar
                                                            1. para pasar la variable a los shells secundarios
                                                        2. 7.- Deleting Environment Variables
                                                          1. 1.- unset myvar
                                                            1. set | grep PATH
                                                              1. mynewvar=goodbye
                                                                1. echo $mynewvar
                                                                  1. goodbye
                                                                  2. $ env | grep mynewvar
                                                                    1. set | grep mynewvar mynewvar=goodbye
                                                                    2. 8.- Quoting to Escape Special Characters
                                                                      1. 1.- touch my big file
                                                                        1. ls
                                                                          1. my big file
                                                                        2. touch 'big my file'
                                                                          1. ls
                                                                            1. 'my big file'
                                                                        3. 9.- Preguntas y Respuestas
                                                                          1. 1.- Use el comando export para agregar un nuevo directorio a su ruta (esto no debe sobrevivir a un reinicio).
                                                                            1. $ touch myfiles/myscript.sh $ echo "#!/bin/bash" >> myfiles/myscript.sh $ echo "cat Hello" >> myfiles/myscript.sh $ chmod +x myfiles/myscript.sh $ myfiles.sh Hello
                                                                            2. 2.- Use el comando unset para eliminar la variable PATH
                                                                              1. Al escribir unset PATH se borrará la configuración de ruta actual. Intentar invocar un binario sin su dirección absoluta fallará.
                                                                              2. 3.- Busque en Internet para encontrar y explorar la lista completa de caracteres especiales.
                                                                                1. Lista de ejemplo: & ; | * ? " ' [ ] ( ) $ < > { } # / \ ! ~.
                                                                                2. 4.- Intente ejecutar comandos usando cadenas formadas por caracteres especiales y usando varios métodos para escaparlos
                                                                                  1. $ echo "$mynewvar" goodbye $ echo '$mynewvar' $mynewvar
                                                                                Show full summary Hide full summary

                                                                                Similar

                                                                                History of Medicine: Ancient Ideas
                                                                                James McConnell
                                                                                BIOLOGY B1 3
                                                                                x_clairey_x
                                                                                IB Economics SL: Macroeconomics
                                                                                Han Zhang
                                                                                Biological molecules
                                                                                sadiaali363
                                                                                Chemistry
                                                                                Holly Bamford
                                                                                AS Chemistry - Enthalpy Changes
                                                                                Sarah H-V
                                                                                Biology B2.2
                                                                                Jade Allatt
                                                                                English Basic Grammar
                                                                                tvazacconcia
                                                                                Conferences of the Cold War
                                                                                Alina A
                                                                                2PR101 1.test - 3. část
                                                                                Nikola Truong