Cheatography
                https://cheatography.com
            
        
        
    
                   
                            
    
                    Comandos más importantes vistos en clase.
I.E.S. Torre de los guzmanes 1º DAM
                    
                 
                    
        
        
            
    
        
                            
        
                
        
            
                                
            
                
                                                | System Information and Networking
                        
                                                                                    
                                                                                            | VER | Muestra la versión del sistema operativo - VER |  
                                                                                            | HELP | Muestra una pequeña ayuda sobre los comandos HELP - HELP comando |  
                                                                                            | ECHO | Muestra mensajes - ECHO HOLA MUNDO |  
                                                                                            | CLS | Limpia la pantalla - CLS |  
                                                                                            | TIME | Muestra y permite cambiar la hora - TIME |  
                                                                                            | DATE | Muestra y permite cambiar la fecha - DATE |  
                                                                                            | DOSKEY | Utilidad para recordar líneas de comandos - DOSKEY c= calc.exe |  
                                                                                            | IPCONFIG | Display Windows IP network configurations |  
                                                                                            | NETSTAT | Display current TCP/IP network connections |  Directory Navigation
                        
                                                                                    
                                                                                            | Unidad: | Cambia la unidad activa - C: D: E: A: |  
                                                                                            | DIR | Visualiza el contenido de un directorio - DIR C:\WINDOWS\ |  
                                                                                            | CHDIR | Directorio actual - CHDIR |  
                                                                                            | MKDIR (MD) | Crea un directorio - MD Dust2 |  
                                                                                            | RMDIR (RD) | Borra directorios - RD Dust2 |  
                                                                                            | CHDIR (CD) | Cambia de directorio actual - CD C:\Cache |  
                                                                                            | TREE | Muestra la estructura de directorios - TREE |  ? - Wildcard representing one character* - Wildcard representing multiple characters
 & - Introduce a new command on the same line
 ^ - Escape character
 Disk Management
                        
                                                                                    
                                                                                            | FORMAT | Formatea una unidad - FORMAT A: |  
                                                                                            | DISKCOPY | Copia un disquete - DISKCOPY A: B: |  
                                                                                            | CHKDSK | Comprueba el estado de un disco - CHKDSK A: |  
                                                                                            | LABEL | Cambia la etiqueta de un disco - LABEL A: |  
                                                                                            | VOL | Muestra la etiqueta de un disco - VOL C: |  
                                                                                            | DEFRAG | Disk Defragmentation |  
                                                                                            | CIPHER | Encrypt/decrypt |  |  | Process Management
                        
                                                                                    
                                                                                            | SCHTASKS | Create/edit a job on Task Scheduler |  
                                                                                            | SET | List environment variables |  
                                                                                            | PATH | Display/change the list of folders stored in the %PATH% |  
                                                                                            | SHUTDOWN | Shutdown the computer |  
                                                                                            | TASKLIST | List running tasks |  
                                                                                            | TASKKILL | End a task |  
                                                                                            | REGREGEDIT | Registry Editor |  File Management
                        
                                                                                    
                                                                                            | COPY | Permite copiar ficheros - COPY C:\Doc1.txt C:\CopyDoc1.txt |  
                                                                                            | XCOPY | Copy extendido. Dispone de modificadores exclusivos |  
                                                                                            | ROBOCOPY | Cualidades de COPY y XCOPY y las perfecciona al máximo |  
                                                                                            | MOVE | Mueve ficheros - MOVE C:\Doc1.txt C:\Copia\ |  
                                                                                            | DEL | Borra ficheros - DEL C:*.txt |  
                                                                                            | REN | Renombra ficheros - REN C:\Doc1.txt C:\DocRevisado.txt |  
                                                                                            | ATTRIB | Muestra o cambia los atributos del archivo - ATTRIB * |  
                                                                                            | TYPE | Permite visualizar el contenido de archivos de texto |  
                                                                                            | EDIT | Edita ficheros de texto |  
                                                                                            | FIND | Output every line that contains a text string |  
                                                                                            | MORE | Display contents, one screen at a time. |  %Variable%
                        
                                                                                    
                                                                                            | USERNAME | Your user name |  
                                                                                            | SYSTEMDRIVE | Your system drive |  
                                                                                            | DATE | The current date |  
                                                                                            | TIME | The current time in TIME format |  
                                                                                            | RANDOM | A random number from 0 to 32767 |  
                                                                                            | PROMPT | The command prompt format |  
                                                                                            | ERRORLEVEL | The error value set when a program exits |  
                                                                                            | CD | The current directory |  
                                                                                            | PATH | Your file search path |  
                                                                                            | HOMEPATH | \Users\{username} |  
                                                                                            | PUBLIC | C:\Users\Public |  
                                                                                            | USERPROFILE | C:\Users\{username} |  
                                                                                            | OS | The operating system |  
                                                                                            | USERDOMAIN | The domain or machine name |  > - Redirecciona stdout.2> - Redirecciona stderror.
 < - Redirecciona stdin.
 >> - Igual que >, pero la salida de la orden se añade a la salida que indiquemos.
 | - Nos permite indicar que la entrada de una orden será la salida de otra orden.
 
 SORT - Nos permite ordenar una salida alfabéticamente.
 FIND - Nos permite filtrar una salida.
 MORE - Nos permite obtener una salida por pantalla paginada.
 |  | Batch
                        
                                                                                    
                                                                                            | REM | Nos permite poner comentarios en el programa |  
                                                                                            | CALL | Llama un archivo de procesos por lotes, sin salir del archivo que hizo la llamada |  
                                                                                            | ECHO | Escribe un mensaje por pantalla |  
                                                                                            | SET /A c = %a% + %b% | Assign the arithmetic expression a+b to the variable c |  
                                                                                            | GOTO | Transfiere el control de proceso a una línea con etiqueta |  
                                                                                            | PAUSE | Pausa el proceso hasta que el usuario pulse una tecla |  
                                                                                            | IF | Desvía condicionalmente el proceso de ejecución de un fichero por lotes |  
                                                                                            | FOR | FOR %%variable IN (conjunto) DO orden |  Example
                        
                                    
                        | @ECHO Off
CLS
FOR /F %%A IN (alumnos.txt) DO (
	net user %%A userUSER2 /add /passwordreq:yes /logonpasswordchg:yes /times:lunes-viernes,3pm-9pm /fullname:"%%A"
)
 |  Flow Control
                        
                                                                                    
                                                                                            | If | IF (condition) do_something |  
                                                                                            | If-else | If (condition) (do_something) ELSE (do_something_else)
 |  
                                                                                            | Nested if | IF (condition1) IF (condition2) do_something
 |  
                                                                                            | Infinite loop | :marker do_something
 GOTO :marker
 |  
                                                                                            | While loop | :marker IF (condition) (do_something GOTO :marker)
 |  EQU - igualNEQ - no igual
 LSS - menor que
 LEQ - menor que o igual
 GTR - mayor que
 GEQ - mayor que o igual
 Shortcut keys
                        
                                                                                    
                                                                                            | Tab | Autocomplete |  
                                                                                            | Ctrl+F | Find text in console (opens dialog box) |  
                                                                                            | F1, F3, F5, F8 | Retype command |  
                                                                                            | F2 | Copy the current command leftward of the cursor |  
                                                                                            | F4 | Delete the current command rightward of the cursor |  
                                                                                            | F6 | Insert end-of-file character |  
                                                                                            | F7 | List previous commands from which you choose |  
                                                                                            | F9 | Retype a command by typing its line number |  | 
            
                            
            
            
        
        
        
        
        
            
    
        
          
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets