-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into improve-home-manager-docs
- Loading branch information
Showing
39 changed files
with
226 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# patch | ||
|
||
> Emparcha un archivo (o archivos) con un archivo diff. | ||
> Ten en cuenta que los archivos diff deben ser generados por el comando `diff`. | ||
> Más información: <https://manned.org/patch>. | ||
- Aplica un parche usando un archivo diff (los nombres de archivo deben incluirse en el archivo diff): | ||
|
||
`patch < {{parche.diff}}` | ||
|
||
- Aplica un parche a un archivo específico: | ||
|
||
`patch {{ruta/al/archivo}} < {{parche.diff}}` | ||
|
||
- Emparcha un archivo escribiendo el resultado a un archivo diferente: | ||
|
||
`patch {{ruta/al/archivo_de_entrada}} -o {{ruta/al/archivo_resultado}} < {{parche.diff}}` | ||
|
||
- Aplica un parche al directorio actual: | ||
|
||
`patch -p1 < {{parche.diff}}` | ||
|
||
- Aplica el reverso de un parche: | ||
|
||
`patch -R < {{parche.diff}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# pg_ctl | ||
|
||
> Utilidad para controlar un servidor PostgreSQL y un grupo (clúster) de bases de datos. | ||
> Más información: <https://www.postgresql.org/docs/current/app-pg-ctl.html>. | ||
- Inicia un nuevo grupo de base de datos PostgreSQL: | ||
|
||
`pg_ctl -D {{directorio_de_datos}} init` | ||
|
||
- Inicia un servidor PostgreSQL: | ||
|
||
`pg_ctl -D {{directorio_de_datos}} start` | ||
|
||
- Detiene un servidor PostgreSQL: | ||
|
||
`pg_ctl -D {{directorio_de_datos}} stop` | ||
|
||
- Reinicia un servidor PostgreSQL: | ||
|
||
`pg_ctl -D {{directorio_de_datos}} restart` | ||
|
||
- Recarga la configuración del servidor PostgreSQL: | ||
|
||
`pg_ctl -D {{directorio_de_datos}} reload` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# pg_dump | ||
|
||
> Extrae una base de datos PostgreSQL en un archivo de script u otro archivo de almacenamiento. | ||
> Más información: <https://www.postgresql.org/docs/current/app-pgdump.html>. | ||
- Vuelca la base de datos en un archivo script-SQL: | ||
|
||
`pg_dump {{nombre_base_de_datos}} > {{archivo_resultado.sql}}` | ||
|
||
- Igual que antes usando además un nombre de usuario: | ||
|
||
`pg_dump -U {{usuario}} {{nombre_base_de_datos}} > {{archivo_resultado.sql}}` | ||
|
||
- Lo mismo que antes usando además equipo y puerto: | ||
|
||
`pg_dump -h {{equipo}} -p {{puerto}} {{nombre_base_de_datos}} > {{archivo_resultado.sql}}` | ||
|
||
- Vuelca una base de datos en un archivo de formato personalizado: | ||
|
||
`pg_dump -Fc {{nombre_base_de_datos}} > {{archivo_resultado.dump}}` | ||
|
||
- Recupera solo datos de bases de datos en un archivo script-SQL: | ||
|
||
`pg_dump -a {{nombre_base_de_datos}} > {{ruta/al/archivo_resultado.sql}}` | ||
|
||
- Vuelca solo el esquema (definiciones de datos) en un archivo script-SQL: | ||
|
||
`pg_dump -s {{nombre_base_de_datos}} > {{ruta/al/archivo_resultado.sql}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# pg_dumpall | ||
|
||
> Extrae un grupo de bases de datos PostgreSQL en un archivo de script u otro archivo de almacenamiento. | ||
> Más información: <https://www.postgresql.org/docs/current/app-pg-dumpall.html>. | ||
- Vuelca todas las bases de datos: | ||
|
||
`pg_dumpall > {{ruta/al/archivo.sql}}` | ||
|
||
- Vuelca todas las bases de datos utilizando un nombre de usuario específico: | ||
|
||
`pg_dumpall {{-U|--username}} {{usuario}} > {{ruta/al/archivo.sql}}` | ||
|
||
- Lo mismo que antes, usando un equipo y puerto: | ||
|
||
`pg_dumpall -h {{equipo}} -p {{puerto}} > {{archivo_resultado.sql}}` | ||
|
||
- Recupera solo datos de las bases de datos en un archivo script-SQL: | ||
|
||
`pg_dumpall {{-a|--data-only}} > {{ruta/al/archivo.sql}}` | ||
|
||
- Vuelca solo el esquema (definiciones de datos) en un archivo script-SQL: | ||
|
||
`pg_dumpall -s > {{archivo_resultado.sql}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# pg_isready | ||
|
||
> Comprueba el estado de conexión de un servidor PostgreSQL. | ||
> Más información: <https://www.postgresql.org/docs/current/app-pg-isready.html>. | ||
- Verifica la conexión: | ||
|
||
`pg_isready` | ||
|
||
- Revisa la conexión con un nombre de host específico y el puerto: | ||
|
||
`pg_isready --host={{nombre_del_equipo}} --port={{puerto}}` | ||
|
||
- Comprueba la conexión mostrando un mensaje solo cuando la conexión falla: | ||
|
||
`pg_isready --quiet` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# pg_restore | ||
|
||
> Restaura una base de datos PostgreSQL de un archivo creado con pg_dump. | ||
> Más información: <https://www.postgresql.org/docs/current/app-pgrestore.html>. | ||
- Restaura un archivo en una base de datos existente: | ||
|
||
`pg_restore -d {{nombre_base_de_datos}} {{archivo_de_datos.dump}}` | ||
|
||
- Igual que antes, utilizando un nombre de usuario: | ||
|
||
`pg_restore -U {{usuario}} -d {{nombre_base_de_datos}} {{archivo_de_datos.dump}}` | ||
|
||
- Lo mismo que antes, usando un nombre de equipo y puerto: | ||
|
||
`pg_restore -h {{equipo}} -p {{puerto}} -d {{nombre_base_de_datos}} {{archivo_de_datos.dump}}` | ||
|
||
- Lista los objetos de bases de datos incluidos en el archivo: | ||
|
||
`pg_restore --list {{archivo_de_datos.dump}}` | ||
|
||
- Limpia los objetos de base de datos antes de crearlos: | ||
|
||
`pg_restore --clean -d {{nombre_base_de_datos}} {{archivo_de_datos.dump}}` | ||
|
||
- Utiliza múltiples trabajos para hacer la restauración: | ||
|
||
`pg_restore -j {{2}} -d {{nombre_base_de_datos}} {{archivo_de_datos.dump}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# pgbench | ||
|
||
> Ejecuta una prueba de referencia (benchmark test) en PostgreSQL. | ||
> Más información: <https://www.postgresql.org/docs/10/pgbench.html>. | ||
- Inicia una base de datos con un factor de escalamiento de 50 veces el tamaño predeterminado: | ||
|
||
`pgbench --initialize --scale={{50}} {{nombre_base_de_datos}}` | ||
|
||
- Hace una prueba de referencia a una base de datos con 10 clientes, 2 hilos de trabajo y 10.000 transacciones por cliente: | ||
|
||
`pgbench --client={{10}} --jobs={{2}} --transactions={{10000}} {{nombre_base_de_datos}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# pgrep | ||
|
||
> Encuentra o envía una señal a procesos por nombre. | ||
> Más información: <https://www.manned.org/pgrep>. | ||
- Regresa PIDs de cualquier proceso de ejecución con una cadena de comando que coincida: | ||
|
||
`pgrep {{nombre_del_proceso}}` | ||
|
||
- Busca procesos incluyendo sus opciones de línea de comandos: | ||
|
||
`pgrep --full "{{nombre_del_proceso}} {{parámetro}}"` | ||
|
||
- Busca procesos gestionados por un usuario específico: | ||
|
||
`pgrep --euid root {{nombre_del_proceso}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# tag | ||
|
||
> Edita etiquetas en archivos de Mac OS X (10.9 Mavericks y superior). | ||
> Más información: <https://github.com/jdberry/tag/>. | ||
- Añade etiquetas a un archivo: | ||
|
||
`tag --add {{nombre_etiqueta1,nombre_etiqueta2,...}} {{ruta/al/archivo}}` | ||
|
||
- Elimina una etiqueta: | ||
|
||
`tag --remove {{nombre_etiqueta}} {{ruta/al/archivo}}` | ||
|
||
- Elimina todas las etiquetas de un archivo: | ||
|
||
`tag --remove \* {{ruta/al/archivo}}` | ||
|
||
- Muestra todos los archivos con una etiqueta determinada: | ||
|
||
`tag --match {{nombre_de_la_etiqueta}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.