Automatically answer yes to all fsck questions

Home -> UNIX -> Solaris -> System administration

12729 views

From the computer of: qmchenry (338 recipes)
Created: Sep 29, 2003     Updated: Jul 19, 2004


0 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

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

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  Check filesystem integrity
  ZFS: How to fsck or check filesystem integrity with scrub
  Solaris: Mount filesystem with UFS logging enabled
  ZFS: Ten reasons to reformat your hard drives
  Solaris 10: enable NFS server
  Solaris software RAID
  ZFS: Unmount or take a filesystem offline
  Add a user from the command line in Solaris
  Simple Solaris BIND/DNS Server Setup with Failover
  Monitor Solaris system load: understanding vmstat

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.