terminal

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