linux

Empty swap area

Dragan Eror's picture
in
swapoff -a && swapon -a

Easiest way to untar multiple .tar.gz files

Dragan Eror's picture
tar-gz archive

Easiest way to untar multiple .tar.gz files

for i in *.tar.gz; do tar xzvf $i; done

Burn ISO to CD with linux terminal

Dragan Eror's picture
terminal

Find address of your cd recorder

cdrecord -scanbus

output will be something like

scsibus1:
1,0,0 100) 'Optiarc ' 'DVD RW AD-7530B ' 'NX02' Removable CD-ROM
1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *

Burn image to CD with previously founded cdrecorder

CD to ISO with linux terminal

Dragan Eror's picture
terminal

If cd was mouted automatically unmout it with umount command

umount /dev/cdrom

or

umount /media/cdrom

on ubuntu
Create CD-ROM ISO image with dd command

dd if=/dev/cdrom of=/tmp/cdimage.iso

if=/dev/cdrom Read from /dev/cdrom (raw format)
of=/tmp/cdimage.iso write to FILE cdimage.iso i.e. create an ISO image

MySQL backup and restore from command line

Dragan Eror's picture
mysql logo

Backup

Simple backup
mysqldump --opt -u[user] -p[pass] [database] > [filename].sql
  • [user] Your database username
  • [pass] The password for your database (note there is no space between -p and the password)
  • [database] The name of your database
  • [filename].sql The filename for your database backup
  • [--opt] The mysqldump option

Reinstalacija Grub loader-a

Dragan Eror's picture

Ako koristite u na istom računaru Windows i Linux, sigurno Vam se desilo da ste reinstalirali Windows nakon čega niste više imali pristup Linux-u, odnosno nije Vam se pojavio Grub menu iz kojeg ste mogli da birate koji sistem želite da podignete.

To se desilo zato što je prilikom reinstalacije Windows prepisao MBR (Master Boot Record), gde se inače
nalazio grub.
To može na jednostavan način da se reši.

Potrebna Vam je neka Linux LIVE verzija, koju možete da podignete, a da je ne instalirate na hard disk.

Ja sam za ovaj tutorijal koristio Ubuntu 9.04.
http://www.ubuntu.com/getubuntu/download

GNU/Linux

MSI GX600PX - Ubuntu Auto Headphones Sound Switch

Dragan Eror's picture

I had have a problem with headphones sound switch on my MSI GX600PX-12EU notebook. When I plug headphones, sound was active on speakers and headphones both. This was a problem when I listen a music while working in the same room with somebody.

headphone

I found cool and easy solution to fix this problem.

  1. You need to open text editor with root permissions and edit file /etc/modprobe.d/alsa-base.conf
    You can do this with hit

Ping kroz mrežu

Dragan Eror's picture
network

Kako saznati koliko je mašina trenutno u mreži i koje su im IP adrese?
Tako što ćete u terminal ukucati sledeću komandu...

for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; \
[ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done

Izvor: http://nultibitovi.net/node/91

Ubuntu virtual hosting

Dragan Eror's picture

Postoji dosta tutorijala koji se bave ovom temom. Neke korisne ću navesti na kraju. Ovaj pišem isključivo radi ljudi kojima taj deo i nije toliko zanimljiv, ali im je ipak neophodan za posao.
Pa da krenemo. Prvo cu navesti neke neophodne alate.

Ubuntu linux
Ovo se naravno podrazumeva. Može se naći na http://ubuntu.com/
gEdit

CUPS - Common UNIX Printing System

Dragan Eror's picture

Nekom će se kad tad desiti da će nešto stampati pod ubuntu-om i da će morati da iz nekog rasloga prekine proces ili više print procesa...

Na windowsu se print proces pojavljuje u system tray-u. U ubuntu postoji CUPS server koji vodi računa o ovim stvarima.
Pristupa mu se iz browser-a.

Možete ga naći na adresi

http://localhost:631/

i odande upravljati svim vašim print procesima...

[ close ]
Help Upgrade the Web: Download Firefox 3.6