Unix/Linux

Comandi e pagine utili a Linux in generale.

Links

.profile

[ -f /etc/profile ] && source /etc/profile
PATH=.:$PATH
PS1='\[`[ $? == 0 ] && X=2 || X=1; tput setaf $X`\]\t:\[`tput sgr0`\] \u@\h: $PWD\n\$

Comandi vari

  • Comandi
    • stty columns 120
    • du -hx --max-depth 1

Patterns

  • VI: cancellazione di spazi :%s/ \+//g

Colori

bold=`tput bold`
nmlblu=$(tput setaf 4)
bldblu=${bold}$(tput setaf 4)
nmlred=$(tput setaf 1)
bldred=${bold}$(tput setaf 1)
nmlcel=$(tput setaf 6)
bldcel=${bold}$(tput setaf 6)
nmlwhi=$(tput setaf 7)
bldwhi=${bold}$(tput setaf 7)
nmlyel=$(tput setaf 3)
bldyel=${bold}$(tput setaf 3)
normal=`tput sgr0`
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License