Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have executed below commands,

dd if=/dev/zero of=/mnt/cdrom/usbfile.bin bs=1024 count=1048576

Getting error as

dd: opening `/mnt/cdrom/usbfile.bin': No such file or directory.

How to create a usbfile.bin file? I thought after executing above mentioned command, it will create usbfile.bin file. But I'm getting error.

share|improve this question
There exists the directory /mnt/cdrom? – enzotib Jul 30 '13 at 6:35
yes.I have created that directories. – Sujatha Jul 30 '13 at 6:36
Have you double checked its existence after the creation command? – enzotib Jul 30 '13 at 6:40
Yeah.It is there.But usbfile.bin is not creating – Sujatha Jul 30 '13 at 6:43

To simply create the file, use command touch /path/to/file. But you have to be sure that this path exists and you have write permissions into that directory.

Now, you choose /mnt/cdrom as path to file. This is obsolete path to CD-ROM. Since it was created manually (probably with sudo prefix), it allows writing there only to the root user. Correct path is /media/cdrom. And even if it was mounted, you would have no write permissions into that directory, because it is a CD-Read Only Memory. The only way you can write files directly onto CD filesystem is using DVD+R/DVD+RW disks.

So, the right command in your case would be such:

touch ~/usbfile.bin
dd if=/dev/zero of=~/usbfile.bin bs=1024 count=1048576

Then burn this file on DVD. I still have no idea why do you need this wasting of DVD, but if you want to do this, it is the right way.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.