Last active
October 26, 2017 07:29
-
-
Save maravilloso/5771724 to your computer and use it in GitHub Desktop.
Comandos útiles Unix
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
DESKTOP: | |
# Abrir explorador de archivos en carpeta actual | |
xdg-open . | |
# Hacer logout de usuario actual para volver a autenticarte gráficamente | |
gnome-session-quit | |
PROCESOS: | |
#Simple: | |
ps ex | |
# Arbol entero: | |
ps axjf | |
# Filtrando para mostrar solo procesos que contengan "jasper" en su nombre | |
ps axjf | grep jasper | |
# Listar procesos por % cpu, eliminando los que usan 0.0 de CPU: | |
ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d' | |
# Listar por uso de memoria: | |
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS | |
FICHEROS | |
# Listar ordenando por fecha: | |
ls -lrt | |
# Listar los que contengan cierta expr.: | |
grep -rnw '/path/to/somewhere/' -e "pattern" | |
# Extensiones diferentes (ordenadas alfabéticamente) dentro de árbol de | |
# subcarpetas, saltándonos las de tests | |
find . -type f | grep -v 'test' | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u | |
# Buscar todos los ficheros de cierto nombre que se han modificado en los últimos 7 días | |
# saltándonos las carpetas de test | |
find . -name choices.py -mtime -7 -exec ls -lah {} + | grep -v test | |
CONSULTAR VERSION LINUX: | |
cat /etc/*-release | |
kernel: | |
uname -r | |
INFORMACION DEL SISTEMA / EQUIPO : | |
sudo dmidecode | grep "System Information" -A8 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment