Archive

Posts Tagged ‘Linux’

Arch Linux: warning: Setting locale failed

May 5th, 2009 karlosp No comments
C:
  1. perl: warning: Setting locale failed.
  2. perl: warning: Please check that your locale settings:
  3. LANGUAGE = (unset),
  4. LC_ALL = (unset),
  5. LC_COLLATE = "C",

edit /etc/locale.gen (sample file) *and then* run locale-gen

Categories: Linux Tags: , ,

Linux Extract Script

March 13th, 2009 karlosp No comments
CODE:
  1. The following function will decompress a wide range of compressed filetypes. Add the function to '~/.bashrc' and then run with the syntax 'extract MyCompressedFile'
  2.  
  3.  extract () {
  4.    if [ -f $1 ] ; then
  5.        case $1 in
  6.            *.tar.bz2)   tar xvjf $1    ;;
  7.            *.tar.gz)    tar xvzf $1    ;;
  8.            *.bz2)       bunzip2 $1     ;;
  9.            *.rar)       rar x $1       ;;
  10.            *.gz)        gunzip $1      ;;
  11.            *.tar)       tar xvf $1     ;;
  12.            *.tbz2)      tar xvjf $1    ;;
  13.            *.tgz)       tar xvzf $1    ;;
  14.            *.zip)       unzip $1       ;;
  15.            *.Z)         uncompress $1  ;;
  16.            *.7z)        7z x $1        ;;
  17.            *)           echo "don't know how to extract '$1'..." ;;
  18.        esac
  19.    else
  20.        echo "'$1' is not a valid file!"
  21.    fi
  22.  }

Categories: Linux Tags: , ,

Linux Bash – sed substring

February 13th, 2009 karlosp No comments
CODE:
  1. echo "This is the TEST(Message(with some tricky word)) from which i want to search." |  <acronym title="Stream Editor">sed</acronym> 's/.*\(TEST.*))\).*$/\1/'

CODE:
  1. echo `expr match "abba (album)" '.*(\(.*\)).*'` -> album

CODE:
  1. stringZ=abcABC123ABCabc
  2. #       =======    
  3.  
  4. echo `expr match "$stringZ" '\(.[b-c]*[A-Z]..[0-9]\)'`   # abcABC1
  5. echo `expr "$stringZ" : '\(.[b-c]*[A-Z]..[0-9]\)'`       # abcABC1
  6. echo `expr "$stringZ" : '\(.......\)'`                   # abcABC1

String manipulating

Arch

February 2nd, 2009 karlosp No comments

Change Webmin user password

/opt/webmin/changepass.pl /etc/webmin <user> <pwd>

Allow connection from IP

vi /etc/webmin/miniserv.conf

Categories: Linux Tags: , , ,

Nastavitve za FRI eduroam linux wpa supplicant

April 22nd, 2008 karlosp No comments

wpa_supplicant.conf

CODE:
  1. ctrl_interface=/var/run/wpa_supplicant
  2. ctrl_interface_group=0
  3. eapol_version=1
  4. ap_scan=1
  5. network={
  6.      ssid="eduroam"
  7.      proto=WPA WPA2
  8.      key_mgmt=WPA-EAP
  9.      group=CCMP TKIP
  10.      eap=TTLS
  11.      phase2="auth=PAP"
  12.      identity="fri63050XXX@campus.fri.uni-lj.si"
  13.      password="geslo"
  14. }

Prijava v omrežje

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf

Nekatere distribucije zahtevajo da proces teče v ozadju.

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf -B

Če povezava ni uspešno vzpostavljena in bi radi preverili, kje je težava, vpišite ukaz in preverite, kje je težava:

CODE:
  1. wpa_supplicant -iwifi0 –Dwext –c/etc/wpa_supplicant.conf –dd

Če je potrebno: Nastavite še vmesnik na nivoju IP z ukazom:

CODE:
  1. dhclient wifi0

Categories: Linux Tags: , , , , , , ,

Linux Set Mouse Speed

November 11th, 2007 karlosp No comments

xset m 3/2 1

Categories: Linux Tags: , , ,

.htaccess & .htpasswd

September 28th, 2007 karlosp No comments
94310 pages viewed, 370 today
49928 visits, 74 today
FireStats icon Powered by FireStats