命令行弹出光盘

要作云存储了。弹出光盘,之前都是在图像界面,点击右键完成,如今在用命令弹出,居然不知道用啥命令,在网上找了找,总算知道了,记录下来。this

第一光驱弹出光盘:eject
第一光驱装入光盘:eject -t
第二光驱弹出光盘:eject /dev/cdrom1
第二光驱装入光盘:eject /dev/cdrom1 -tit

man了一下ejectio

-t   With this option the drive is given a CD-ROM tray close command. Not all devices support this command.sed

意思就是关闭光驱,但并非全部设备都支持这个命令。注意:-t 使用前,光驱是打开的,不然,输入这个命令没意义。command

 -T   With this option the drive is given a CD-ROM tray close command if it’s opened, and a CD-ROM tray eject command if  it’s  closed. Not all devices support this command, because it uses the above CD-ROM tray close command.vi

加参数T就比较爽了,若是,光驱是关着的,输入命令后,光驱会打开。若是,光驱是开着的,输入命令后,光驱会关闭。co

相关文章
相关标签/搜索