Automatically answer yes to all fsck questions

Contributor Icon Contributed by qmchenry Date Icon September 29, 2003  
Tag Icon Tagged: Solaris system administration

When filesystem errors prevent a reboot, you are instructed to run fsck on the affected filesystem. If there are lots of errors, you may be stuck typing y for hours. An option to fsck can automatically answer yes for you.


Warning: Use this at your own risk. You may not always want to answer yes to everything. This is helpful in some cases when you are not concerned with the integrity of all of the contents of the filesystem.

To fsck the unmounted filesystem c0t0d0s0 and answer yes to every question, run the following command as root:

fsck -y /dev/rdsk/c0t0d0s0

See also: Check filesystem integrity

Previous recipe | Next recipe |
 
blog comments powered by Disqus