== config
<code bash>
# cambiar editor por defecto
$ sudo update-alternatives --config editor
</code... * $ - final de linea
* gg - principio documento
* G - final de documento
* iw - inside word
* aw - arorund word
* . - repite última edi...
==Moving in the file
* ''0'' : move the cursor to the begining of the line
* ''G'' o ''$'' : move
Linux sadservers
== "Saint John": what is writing to this log file?
* ''ps auxf''
* ''lsof /path/to/file''
* ''fuser /path/to/file''
* ''pwdx PID'': pwd del fichero PID
<code>
1. You can use ps to list all processes and see if you see something r
ript
* De Inicio: los shells que se ejecutan justo después de haberse identificado. Son los que soli... or razones de seguridad, desactiva el almacenamiento de un fichero de historial permanente para root. ... También establece un símbolo del sistema por defecto. Entoces invoca a pequeños guiones de propósito único en el directorio /etc/profile.d para proporcion
scripción ^
| **${ARRAY[N]}** | recupera el elemento N |
| **${ARRAY[S]}** | recupera el elemento S en arrays **asociativos** |
| **"${ARRAY[@]}"** | \\ ... s\\ Si está entrecomillado, @ devuelve cada elemento, %%*%% devuelve un único resultado con todos los ... ::: |
| **"${ARRAY[@]:N:M}"** | \\ De funcionamiento similar a la regla anterior, añade que devuelve d
...}<POSTSCRIPT>
</code>
Brace expansion is used to generate arbitrary strings. The specified strings are used to generate **all possible combinations** with the o... ing preambles and postscripts.
Usually it's used to generate mass-arguments for a command, that follo... first step in expansion-handling, it's important to understand that. When you use
<code>
echo {a,b}$P
e excritura al others
umask 002
#prompt por defecto
PS1='[\h]$ '
# prompt de color en 2 lineas
if [ ... onets
# Please check /usr/doc/tcsh/examples/alias to see other possible values.
# recopilación de ali... $@"} | head -20; }
# host en mis subnets con puerto SSH abierto
sshearch() { nmap -p22 -oG - $(ip addr | awk '/inet .*global/ {print $2}' | tr '\n' ' ')
stackexchange.com/questions/317695/is-it-possible-to-have-apt-accept-an-invalid-certificate]]
* igno... untu.com/questions/187888/what-is-the-correct-way-to-completely-remove-an-application]]
* ''remove''... ark unhold <paquete>''
* ''apt-mark''
* **auto**: marca los paquetes como instalables automatica... será desinstalado automaticamente.q
* **showauto**: lista de paquetes marcados como automaticos
inas virtuales (que recrean un ordenador al completo, con sus propios kernels y sistemas de ficheros)
... * portabilidad de aplicaciones
* aislamiento de procesos
* prevenir la fragilidad del exte... * manejo de recursos
* Partes de funcionamiento de Docker:
* docker daemon
* docker CLI
... ps://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-getting-started]]
* [[
is is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
#
# Based on original .rtorrent.rc file from http://libto... te (see "on_finished")
# /Torrents/TorrentFiles/Auto - The 'autoload' directory for rtorrent to use. P
all
* reset: disables and resets the firewall to default
* reload: reloads the current running... * disable: disables the firewall
== uso por defecto
* consultar:<code bash>grep 'DEFAULT_' /etc/def... sh # /etc/services</code>
* bloquear una ip+puerto a una ip específica:<code bash>sudo ufw deny from 192.168.2.100/8 to 192.168.2.101 port 25</code>
* rango de puertos
gs pasados al script |
| $_ | Último argumento del comando anterior |
| $! | PID del últim... mismo que $variable |
| ${parametro-valorPorDefecto} | si el parámetro no está establecido, se le asigna el de por defecto |
| ${parametro:-valorPorDefecto} | si el parámetro no está establecido o es vacío, se le asigna el d
icamente (o no) al arrancar
^destino ^ punto/montaje ^ tipoFS ^ opciones * ... |
| /server/share | /mnt/carpeta | smbfs | noauto,credentials=/home/mate/.smbpasslacie,dir_mode=077... point: Directorio de montaje de la partición (punto de montaje).
* type: Tipo de sistema de ficheros que contiene la partición. Si se pone auto, permitimos a la orden mount determinar qué tipo
ctivo
== ejemplo
=== usage
* renames 'foo.lis' to 'foo.txt', 'my.old.stuff.lis' to 'my.old.stuff.txt':<code bash>zmv '(*).lis' '$1.txt'</code>
* Some... you combine this with noglob, you don't even need to quote the arguments.<code bash>alias mmv='noglob ... : ; * ? " < > |
# NOTE: ``-Q'' and (D) is to include hidden files.
$ unwanted='[:;*?\"<>|]'
l nombre del dominio y ofrece información en formato BIND
* -x: inverso, se la la IP
* nohup : M... [http://askubuntu.com/questions/333640/cp-command-to-exclude-certain-files-from-being-copied
]]
<code... ir1 /var/dir2 /nas/dir3 | xargs -n 1 cp -v /path/to/file'': copia **file** en **dir1,dir2,dir3**
* ... * -s : solo totales
* --max-depth=x : cuanto de profundo baja en el árbol para mostrar informa
.
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.n... nx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean