Búsqueda#
locate#
[1]:
%%bash
# apt update
# apt install mlocate
[2]:
%%bash
#
# Busca en todo el sistema cualquier ocurrencia de la palabra indicada
#
locate apache
/etc/apache2
/etc/apache2/conf-available
/etc/apache2/conf-available/gitweb.conf
/usr/share/vim/vim81/syntax/apache.vim
/usr/share/vim/vim81/syntax/apachestyle.vim
whereis#
[3]:
%%bash
#
# Busca archivos binarios incluyendo la ubicación, el fuente y la ayuda
#
whereis python3
python3: /usr/bin/python3.8 /usr/bin/python3 /usr/lib/python3.8 /usr/lib/python3.9 /usr/lib/python3 /etc/python3.8 /etc/python3 /usr/local/lib/python3.8 /usr/share/python3
which#
[4]:
%%bash
#
# Busca archivos binarios en la variable PATH
#
which python3
/usr/bin/python3
find#
[5]:
%%bash
# Busca indicando el directorio para iniciar la búsqueda, el tipo de archivo y
# el nombre del archivo
find / -type f -name apache2
grep#
[6]:
%%bash
#
# Procesos ejecutandose en el sistema
#
ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 3.0 1.2 352924 96648 pts/0 Ssl+ 23:34 0:04 /usr/bin/python3 /usr/local/bin/jupyter-lab
root 473 15.7 0.7 846696 62140 ? Ssl 23:36 0:00 /usr/bin/python3 -m ipykernel_launcher -f /root/.local/share/jupyter/runtime/kernel-cd54e40a-2bed-41db-9fde-a78a5576c456.json
root 503 0.0 0.0 5736 3072 ? S 23:36 0:00 bash
root 505 0.0 0.0 7652 3072 ? R 23:36 0:00 ps aux
[7]:
%%bash
#
# Procesos que contengan apache2
#
ps aux | grep apache2
root 509 0.0 0.0 5196 2304 ? S 23:36 0:00 grep apache2