fsck -y

Once in a while, I would think it advisable to run fsck -y to check the disk.
Should I sign in as su or sudo?
What is the difference and which is preferred?

Thank you in Advance!

You should probably take it down to single user, so you can unmount all filesystems. In that case, either log in as root or use "su -".

In some cases (like Linux, not too sure about others), it would actually even be easier (better?) to reboot, boot up off of a floppy (so no disk partitions are mounted), and run it from there.

sudo is configurable to the point that can drive a micro-manager to ecstacy. It can also be a very simple config. It does log commands executed which is nice, especially on systems where more than one person have/need root access.

sudo is most useful on systems that are already setup and are just being adminned. There's a time and place for su and sudo each. sudo shouldn't be considered a global replacemnt for su as it isn't always needed.

Check out your Unix man page for Sudo or Su and decide which gets better for your use.

And even better, you don't necessarily have to give the user root access. They can simply execute a command / script as another specified user as well, so they have no root access at all. You can also set it up so that everyone in one group can use sudo, rather than having to set it up for each individual person.

See if you have it installed and check the man page. If not, see here:
http://www.courtesan.com/sudo/

Well, it works well!
For those who use a Macintosh(and I am one) this is "part of" Disk First Aid being built in.
The steps follow:
sudo ShutDown Now Hit return
Enter password
You are "sudo user"
You are in single user mode:
type fsck -y
The disk is checked. If you receive a "message" that the Macintosh appears to be OK type reboot.
This saves a CD Rom Start which is slow as molasses.
If errors are found they will be repaired -y for yes repair.
Wonderful to learn this.:slight_smile: