[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
es:howtos:software:efficient_cli_navigation [2019/08/28 14:57 (UTC)] – [Symlinks] slackwarespanol | es:howtos:software:efficient_cli_navigation [2019/08/29 12:46 (UTC)] (actual) – [Fuentes] slackwarespanol | ||
---|---|---|---|
Línea 127: | Línea 127: | ||
- | ===== Bash Aliases | + | ===== Alias Bash ===== |
- | You can make your life easier by creating aliases | + | Puede facilitarle la vida creando alias (= accesos directos) para los comandos que utiliza con frecuencia. La sintaxis es muy simple: |
< | < | ||
- | You can place your aliases in '' | + | Puede colocar sus alias en '' |
< | < | ||
- | or | + | o |
< | < | ||
- | When it comes to navigation, one could, for example, create a few aliases to speed up navigating up the directory tree: | + | Cuando se trata de navegación, uno podría, por ejemplo, crear algunos alias para acelerar la navegación en el árbol de directorios: |
< | < | ||
Línea 148: | Línea 148: | ||
alias 4.='cd ../../../.. ; pwd'</ | alias 4.='cd ../../../.. ; pwd'</ | ||
- | The value of an alias can be quite complex. As you can see, '' | + | El valor de un alias puede ser bastante complejo. Como puede ver, '' |
< | < | ||
Línea 158: | Línea 158: | ||
/ | / | ||
- | Aliases can be used in a number of different ways. A few more examples: | + | Los alias se pueden usar de diferentes maneras. Algunos ejemplos más: |
< | < | ||
alias slacktop=' | alias slacktop=' | ||
- | ===== Directory | + | ===== Stack (pila) de directorios en bash |
- | BASH features some helpful directory stack buildins that help you navigate recently visited directories. | + | BASH presenta algunos complementos útiles de la pila de directorios que lo ayudan a navegar por los directorios visitados recientemente. |
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | ==== How does it work in practice? ==== | + | * '' |
+ | * '' | ||
+ | * '' | ||
- | First of all, add a directory to the stack. Please note that it also automatically switches to the directory | + | ==== ¿Cómo funciona en la práctica? ==== |
+ | |||
+ | En primer lugar, agregue un directorio | ||
< | < | ||
Línea 179: | Línea 180: | ||
user@darkstar: | user@darkstar: | ||
- | Alternatively, you can '' | + | Alternativamente, puede '' |
< | < | ||
- | After adding a few directories you can display the content of the stack: | + | Después de agregar algunos directorios, |
< | < | ||
Línea 194: | Línea 195: | ||
6 ~/ | 6 ~/ | ||
- | Please note that the first entry always displays the current working directory so if it also sits at the top of the stack, you'll see what seems like duplicate lines. The '' | + | Tenga en cuenta que la primera entrada siempre muestra el directorio de trabajo actual, por lo que si también se encuentra en la parte superior de la pila, verá lo que parecen líneas duplicadas. El indicador |
- | + | ||
- | To switch to one of the directories in the stack you could issue: | + | |
+ | Para cambiar a uno de los directorios en la pila, puede emitir: | ||
< | < | ||
user@darkstar: | user@darkstar: | ||
- | Admittedly, this is not the most concise way of changing directories. To make it shorter we can add an alias and a function to the '' | + | Es cierto que esta no es la forma más concisa de cambiar directorios. Para acortarlo, podemos agregar un alias y una función al archivo |
< | < | ||
- | List the current stack by simply typing | + | Enumere la pila actual simplemente escribiendo |
< | < | ||
Línea 217: | Línea 217: | ||
}</ | }</ | ||
- | The '' | + | La función |
< | < | ||
- | ====== | + | ====== |
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> | ||
- | | + | * Fuente original: [[http:// |
+ | * Traducido por [[wiki: user: slackwarespanol | Víctor]] | ||
<!-- * Contributions by [[wiki: | <!-- * Contributions by [[wiki: | ||