Herramientas de usuario

Herramientas del sitio


wiki2:linux_commands

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
wiki2:linux_commands [2020/01/01 11:07]
alfred [xargs]
wiki2:linux_commands [2020/05/09 09:25] (actual)
Línea 88: Línea 88:
   * For changing the user and the group recursively:​ ''​chown www-data: -R .'' ​   * For changing the user and the group recursively:​ ''​chown www-data: -R .'' ​
  
 +===== findmnt =====
 +To display mounted data:
 +<​code>​
 +findmnt
 +</​code>​
 +Other options:
 +<​code>​
 +# List format
 +findmnt -l
 +# Showing disk usage
 +findmnt –D
 +# fstab
 +findmnt -s
 +# filter by type:
 +findmnt -t ext4
 +findmnt -t xfs
 +# filter by device:
 +findmnt -S /dev/vda3
 +# filter by mounted point:
 +findmnt -T /
 +</​code>​
 ===== tail ===== ===== tail =====
 To see the last lines of a file. To see the last lines of a file.
   * For maintaining it reading it use ''​-f''​ parameter.   * For maintaining it reading it use ''​-f''​ parameter.
  
 +
 +===== tree =====
 +To see a tree of only directories until 3rd level:
 +
 +<​code>​
 +tree -d -L 3
 +</​code>​
 +
 +The next will also give you the disk space used:
 +<​code>​
 +tree --du -h
 +</​code>​
 ===== xargs ===== ===== xargs =====
 To send output as parameters: To send output as parameters:
Línea 100: Línea 133:
 </​code>​ </​code>​
  
-*Script example* for creating .cbz files from folders inside the current path:+**Script example** for creating .cbz files from folders inside the current path:
 <​code>​ <​code>​
 ls -1 | xargs -I {} zip {}.cbz -r {} ls -1 | xargs -I {} zip {}.cbz -r {}
Línea 145: Línea 178:
  
 ====== Others ====== ====== Others ======
 +===== Close others sessions =====
 +:!: It's not recommended to do this for root; it could close all the current running processes.
 +<​code>​
 +pkill -KILL -u user
 +</​code>​
 +===== Create cbz from folders =====
 +<​code>​
 +ls -1 $* | xargs -I {} zip "​{}.cbz"​ -r "​{}"​
 +</​code>​
 ===== Clear and reset ===== ===== Clear and reset =====
 You can do ''​Ctrl+l''​ to clear the screen which is the same than ''​clear''​ command. You can do ''​Ctrl+l''​ to clear the screen which is the same than ''​clear''​ command.
wiki2/linux_commands.1577876864.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)