Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 815 Bytes

File metadata and controls

60 lines (35 loc) · 815 Bytes
description
Comandi Linux generali

Linux commands

FG e BG

  • CTRL+Z = mettere in background.
  • Tornare all'attivitá:
fg

Formattare l'history

  • HISTTIMEFORMAT="%Y-%m-%d %T "
    
    history
    ...

in .bashrc :

  • # non aggiunge duplicati o comandi che iniziano con lo spazio nell'history:
    HISTCONTROL=ignoreboth
    

Scrivere usando i caratteri di escape:

  • echo -e "hello world\n\nwelcome here!"

Visualizzare i processi che consumano piú CPU e salvarli in un file:

  • top -b -n l > top.$(date +%F)_$(date +%R)

Mostrare proprietá del sistema corrente:

  • hostnamectl status

Visualizzare numero righe senza # (ossia quelle decommentate):

  • grep ^[^#] /etc/ssh/ssh_config | wc -l