You should probably not make a filesystem on an entire disk. Instead, you should make it on a partition on the disk (which would be something like
/dev/sdc1 rather than
/dev/sdc). If you don't already have a partition you can make that first. The partition can (essentially) be the size of the whole disk, if you like. Even when you only want one partition on the disk, you still need to actually make the partition. Many utilities and applications (and people!) will not work, or will behave strangely, if your filesystems are not on partitions.
If you really know what you are doing and you're sure you want to make a filesystem that is not part of any partition, you can do make
mkfs.ext3 do this without prompting the user, by using the
-F flag. This is almost always preferable to simulating interactive input with a pipe (it's simpler, more self-documenting, and what if something unexpected happens and the question is something else, like the device already being mounted?). On the other hand, in some situations (with some utilities) you may find you have to pipe
yes to a utility, so it's a good technique to be aware of.
From the description of the
-F flag in
Force mke2fs to create a filesystem, even if the specified
device is not a partition on a block special device, or if other
parameters do not make sense. In order to force mke2fs to
create a filesystem even if the filesystem appears to be in use or is
mounted (a truly dangerous thing to do), this option must be
So, you can use
mkfs.ext3 -F /dev/sdc.
But, to reiterate, you should probably not do this at all because filesystems should almost always be created on a partition.