LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-09-2008, 04:26 AM   #1
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Rep: Reputation: 33
Script to burn CD and DVD


Thanks to your help, I built the burning script that follows. Please, let me know modifications or things you would add to it. Goal: To create a script to burn a CD or DVD with /backups contents.

By the way, I use \ to continue writing a command on next line (in a script). Is that correct?

Thanks in advance.

Code:
#! /bin/sh
echo  PREPARE FOR THE BURN
echo
sleep 3
mkisofs -o /home/lacalga/iso_images/databurn.iso -graft-points -rational-rock -full-iso9660-filenames -iso-level 2 -r -J /backups
echo
echo  START THE BURN
sleep 3
sudo /usr/bin/cdrecord -v speed=2 dev=1,0,0 /home/user/iso_images/databurn.iso
sleep 3
echo
echo  DONE.
sleep 3
Glore2002.-
 
Old 09-09-2008, 04:34 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
The first line is not correct, you have to remove the space between #! and /bin/sh, like:
Code:
#!/bin/sh
Why do you make your program sleeping after cdrecord command and after DONE ?
 
Old 09-09-2008, 05:22 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
If you want why not use something like:
http://bashburn.sourceforge.net/

Or, I wrote a script myself that burns iso or backup directories, that's quite simple to use. You can download it here, it is called 'burnit':
http://draconishinobi.50webs.com/sla...ul-scripts.tgz

It's simple to use:
Code:
burnit source destination
# this burns an iso:
burnit /home/bob/whetever.iso /dev/sr0
# this burns a directory or a single file
burnit /home/bob/backups /dev/sr0
It automatically detects if you have a writable DVD or CD in your drive. I've used it for quite some time, so it's relatively free of bugs. But tell me if you find any.
 
Old 09-09-2008, 05:42 AM   #4
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Lubuntu 17.10 x64
Posts: 510

Original Poster
Rep: Reputation: 33
Thumbs up Thank you!

Great script to burn cd or dvds! As I can see, the file has many scripts. I will try to find out what they are for.

How can I make sure my DVD recorder is sr0 or any other? (It's a SATA unit). What command can I use to know this? My fstab doesn't have a stanza for CD or DVD recorder. Is that OK?


Note: You were right keefaz, I left a space I shouldn't.


Thanks!

Last edited by glore2002; 09-09-2008 at 10:42 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I burn Fedora-8-i386-dvd.iso to CD's? I do not have a DVD burner Learn41 Linux - Newbie 5 02-18-2008 06:46 PM
LXer: Howto: Linux write (burn) data to DVD or DVD/RW at shell prompt LXer Syndicated Linux News 0 07-11-2006 03:21 PM
SCRIPT: Convert & Burn to DVD bukzor Linux - General 2 05-13-2006 01:24 AM
Permission Denied to burn/erase DVD RW with DVD+RW tools themystic Linux - Hardware 2 08-30-2005 11:32 AM
How to burn the downloaded Fedora 3 DVD ISO onto DVD yaabaa Linux - Newbie 10 03-14-2005 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration