Buscar cadena de texto en todos los ficheros
find -type f -exec grep -l "texto_busqueda" {} +
y si queremos que la búsqueda sea exacta (por palabras)
find -type f -exec grep -lw "texto_busqueda" {} +
find -type f -exec grep -l "texto_busqueda" {} +
y si queremos que la búsqueda sea exacta (por palabras)
find -type f -exec grep -lw "texto_busqueda" {} +
Para arrancar automáticamente un contenedor cuando se inicie Docker (cuando se encienda el sistema): docker update –restart=always <contenedor>
Partiendo del fichero si hacemos cat file5_new.txt | tr ‘\n’ ‘ ‘ | awk ‘{$1=$1}1’ FS=" " OFS="\t" > file5_restore.txt obtenemos
En este ejemplo borra las líneas 1 a 10: sed -n -e :a -e ‘1,10!{P;N;D;};N;ba’
Para renombrar un fichero: #!/bin/bash # Renombra el fichero según las etiquetas mp3, de la forma: NºCanción-Título TITLE="`id3info "$1" | grep ‘^=== TIT2’ | sed -e ‘s/.*: //g’`" #ARTIST="`id3info "$1" | grep ‘^=== TPE1’ | sed -e ‘s/.*: //g’`" #ALBUM="`id3info "$1" | grep ‘^=== TALB’ | sed -e ‘s/.*: //g’`" #YEAR="`id3info "$1" | grep ‘^===…
ls -R | grep : | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’
Se hace desde Window -> Preferences