What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Create a iso from the disk.

Terminal - Create a iso from the disk.
cat /dev/cdrom > ~/mydisk.iso
2009-03-26 05:54:41
User: sata
Functions: cat
Create a iso from the disk.

Generate the iso from the disk, easily.

same as "dd if=/dev/cdrom of=~/mydisk.iso"


There are 6 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

are you kidding?

Comment by linuxrawkstar 401 weeks and 3 days ago

Either you are novice.. or you are kidding..

I have been using it for so long time.

Check it before voting.

Comment by sata 401 weeks and 3 days ago

mine is

cat /dev/sr0 > ./mydisk.iso

cat: /dev/sr0: Input/output error

what about other???

Comment by megerdin 401 weeks and 3 days ago

This works .. in some machines have a soft link for /dev/sr0 as /dev/cdrom.

it worked for me in suse. That inupt output error may be if u dont have a cd placed in ur cdrom!!

Comment by klosd 401 weeks and 3 days ago

You'd probably be better off using dd.

Comment by hooobs 401 weeks and 3 days ago

That is,

dd if=/dev/cdrom of='mydisk.iso'

Comment by hooobs 401 weeks and 3 days ago

GAH!! This is simply the worst use of cat I've seen. Are you not aware of the tools you have at your disposal? Do you not realize that there is no error checking while creating that ISO image? @hoooobs you too. 'dd' is a horrible way of creating an ISO. Lastly, is the search bar invisible? Does no one know how to search?


readom dev=/dev/scd0 f=./mydisk.iso

Use the right tools for the right jobs.

Comment by atoponce 401 weeks and 3 days ago


On my centos box, I don't have readom, nor did yum find it when I told it to search. So in this case dd (my preferred choice) for creating images, is the right tool.

There is more than one way to do things. You may not feel the way others do it is best, but it's what works for them.

Comment by rattis 401 weeks and 3 days ago

@rattis Then, in your case, use the 'cdrecord' package with the 'readcd' binary, which is essentially 'readom'. You can use your 'dd' or 'cat' to create your ISO, but when you burn the ISO, and you find you didn't get all the bits, you get to do it again. Why not do it the right way?

Comment by atoponce 401 weeks and 3 days ago

How about mkisofs?

Comment by deltwalrus 401 weeks and 3 days ago

thanks, atoponce, for saying what I was too tired to say last night in the wee hours of the morning. mkisofs is also nice.

Comment by linuxrawkstar 401 weeks and 3 days ago

Come on people, let's be civil. It is a little tiring when the non-optimal methods for doing something (in this case optical media -> iso file) keep getting posted, I agree. We all weren't born with command-line knowledge, though, were we?

I propose some sort of greatest hits page or FSC (frequency submitted commands) page where we list the bad, decent, and best ways to do things. Maybe we should adopt a behavior where one simply links to another submission, in a comment, as the most optimal way of doing something. With enough linking to the optimal procedure, google is likely to pick up on that optimal solution.

Comment by bwoodacre 401 weeks and 3 days ago


I haven't had a problem where dd hasn't worked for me yet. Until I have a problem where it fails, I'll keep doing things the way I do them. If it works, it is the right way.

Comment by rattis 401 weeks and 3 days ago

@rattis Using that argument, you could continue pulling your USB drive from the port without successfully unmounting it. You might not have data loss the first, second, or even third time doing it, but when it happens, you'll wish you did it right to begin with.

Comment by atoponce 401 weeks and 3 days ago

@delwalrus @linuxrawkstar 'mkisofs' is good for making an ISO image from a directory, but isn't really designed to do it from optical media. But it is certainly a step in the right direction.

Comment by atoponce 401 weeks and 3 days ago

wodim provides the readom command

cdrecord provides readcd

One of the two -should- be installed on any Linux system you would burn discs on.

Comment by Viaken 401 weeks and 2 days ago

@atoponce Thanks!

Comment by megerdin 401 weeks and 1 day ago

@atoponce,Worst Use! What does it mean?

If anything works, then simply, it works.

If "$ dd if=/dev/cdrom of=~/mydisk.iso" works then

"$ cat /dev/cdrom >~/mydisk.iso" works too.

And should I point that the later one is more easier?

Why every body is Voting -ve. I cannot understand.

Comment by sata 401 weeks ago

@atoponce if you are so worried about errorchecking you can always just md5sum it afterwards.

Comment by sirlewk 394 weeks and 6 days ago

Your point of view

You must be signed in to comment.