commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Nothing fancy, just a regular filesystem scan that calls the badblocks program and shows some progress info. The used options are:
-c ? check for bad sectors with badblocks program
-D ? optimize directories if possible
-f ? force check, even if filesystem seems clean
-t ? print timing stats (use -tt for more)
-y ? assume answer ?yes? to all questions
-C 0 ? print progress info to stdout
/dev/sdxx ? the partition to check, (e.g. /dev/sda1 for first partition on first hard disk)
NOTE: Never run fsck on a mounted partition!
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.