zoukankan      html  css  js  c++  java
  • Linux 数据 CD 刻录

    http://www.cyberciti.biz/tips/linux-burning-multi-session-cds-on-linux.html

    #mkisofs -dvd-video -input-charset default -udf -o DVD.iso    # 试看能不能解决中文乱码问题: -input-charset gb18030

    Under Linux you can use tool called cdrecored (use to record audio or data Compact Discs) with mkisofs (use to create an hybrid SO9660/JOLIET/HFS filesystem with optional Rock Ridge attributes ) for this purpose.

    Step #1: Create first session as follows

    1) Create an iso image first:

    # mkisofs -R -o /tmp/cd.iso /backup/06-07-2004/

    Where,

    • -R : Uses Rock Ridge naming convention/attributes
    • -o : Name of new iso file (cd.iso)
    • /backup/06-07-2004/ : Everything in /backup/06-07-2004/ will be put into cd.iso file

    2) Burning the disk (or an ISO image) for first session:

    # cdrecord -dev=0,0,0 -multi -data -v -eject -speed=4 /tmp/cd.iso

    Where,

    • -dev=0,0,0 : device number (tip you can use cdrecord -scanbus command to get this number)
    • -multi : Start multi session disk
    • -data : This option required for HP and Sony CD Writer only.
    • -v : Verbose i.e show info while burning the disk
    • -eject : Ejects the CD when done
    • -speed=4 : Write speed (4x)
    • cd.iso : Name of image being burned

    3) Mount cdrom and see the contains:

    # mount /mnt/cdrom
    # ls /mnt/cdrom
    # rm -f /tmp/cd.iso

    OR

    # mount /dev/hda /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/cd.iso

    4) You can also verify that how many sessions written so far:

    # umount /mnt/cdrom
    # cdrecord -dev=0,0,0 -toc

    Where,

    • -dev=0,0,0 : Device number
    • -toc : Retrieve and print out the table of content

    Step #2: Burning the disk (or ISO image) for next session

    Next session is bit tricky. You need to specify last sessions starting and ending sector numbers this information can be obtained from the following command:

    # cdrecord -dev=0,0,0 -msinfo

    Output:

    0,11063

    1) Create next session ISO file:

    # mkisofs -o /tmp/ses2.iso -R -V session2 -C $(cdrecord -dev=0,0,0 =msinfo) -M 0,0,0 /backup/07-07-2004

    Where,

    • -C $(cdrecord -dev=0,0,0 –msinfo) : This option is needed when mkisofs is used to create the image of a second session or a higher level session for a multi session disk
    • -M 0,0,0 : Specifies path to existing iso9660 image to be merged.

    2) Burning the disk (or an ISO image) for second session:

    # cdrecord -dev=0,0,0 -multi -data -v -eject -speed=4 /tmp/ses2.iso

    3) Mount cdrom and see the contains:

    # mount /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/ses2.iso

    OR

    # mount /dev/hda  /mnt/cdrom; ls /mnt/cdrom; rm -f /tmp/ses2.iso

    Note: When you wish to close disk (multi session cd), omit the -multi option for last session.

  • 相关阅读:
    Linux初级知识_04 -- 目录结构与目录管理
    查找无限整数序列的第n位1,2,3,4,5,6,7,8,9,10,11,...
    谷歌面试题:在半径为1的圆中随机选取一点
    FtpClient 调用storeFile 抛出 java.net.SocketException异常
    CountDownLatch 使用
    软件版本号比较 java工具类
    pcm文件转wav C语言
    unimrcp更改安装目录
    xpath学习记录
    jackson 实体转json 为NULL或者为空不参加序列化
  • 原文地址:https://www.cnblogs.com/exclm/p/3507792.html
Copyright © 2011-2022 走看看