Herramientas de usuario

Herramientas del sitio


comandos

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

comandos [2019/01/03 07:37]
jamoralesm creado
comandos [2019/01/03 07:39] (actual)
jamoralesm
Línea 1: Línea 1:
 # 1. redo last command but as root # 1. redo last command but as root
-sudo !!+<​code>​sudo !!</​code>​
  
 # 2. open an editor to run a command # 2. open an editor to run a command
-ctrl+x+e+<​code>​ctrl+x+e</​code>​
  
 # 3. create a super fast ram disk # 3. create a super fast ram disk
-mkdir -p /mnt/ram +<​code>​mkdir -p /mnt/ram 
-mount -t tmpfs tmpfs /mnt/ram -o size=8192M+mount -t tmpfs tmpfs /mnt/ram -o size=8192M</​code>​
  
 # 4. don't add command to history (note the leading space) # 4. don't add command to history (note the leading space)
- ls -l+<​code> ​ls -l</​code>​
  
 # 5. fix a really long command that you messed up # 5. fix a really long command that you messed up
-fc+<​code>​fc</​code>​
  
 # 6. tunnel with ssh (local port 3337 -> remote host's 127.0.0.1 on port 6379) # 6. tunnel with ssh (local port 3337 -> remote host's 127.0.0.1 on port 6379)
-ssh -L 3337:​127.0.0.1:​6379 root@emkc.org -N+<​code>​ssh -L 3337:​127.0.0.1:​6379 root@emkc.org -N</​code>​
  
 # 7. quickly create folders # 7. quickly create folders
-mkdir -p folder/​{sub1,​sub2}/​{sub1,​sub2,​sub3}+<​code>​mkdir -p folder/​{sub1,​sub2}/​{sub1,​sub2,​sub3}</​code>​
  
 # 8. intercept stdout and log to file # 8. intercept stdout and log to file
-cat file | tee -a log | cat > /dev/null+<​code>​cat file | tee -a log | cat > /dev/null</​code>​
  
 # bonus: exit terminal but leave all processes running # bonus: exit terminal but leave all processes running
-disown -a && exit+<​code>​disown -a && exit</​code>​
comandos.txt · Última modificación: 2019/01/03 07:39 por jamoralesm