Next / Previous / Contents / TCC Help System / NM Tech homepage

11.6.    Description of ucsh (sudo) commands

Note

The list of commands is slightly different between different platforms.

acctmngr

See Section 11.5, “  The account manager, acctmngr ”.

arch

Returns the architecture type of the machine running the command, such as i686 for an Intel box.

chmod

Set file permissions. See man chmod for details.

chsh username [shell]

Allows the UC to change the shell used by other users. After this command is run a ypmake must be run.

K. Scott modified the command to use usermod instead of passwd on Jan 27, 2000 since the man page lies about how passwdZ works. Also, if you don't specify a shell it will use a default of /bin/bash.

du

Counts up disk usage for a directory tree. See the man page for du.

A simple du will give you the disk usage of the uc account. du path will provide the disk usage of the specified path. To check the disk usage of a specific account, the full, real path must be given.

Note

For example: du /u/blah won't work, but du /fs/cesium/accounts/blah does.

file filename

Determines the file type of a specific file (e.g., Post Script, man page, executable, ASCII text).

hostname

Returns the hostname of the machine the command is run on.

ls options

Just exactly like ls.

Note

This will not allow you to look at directories you normally wouldn't be able to look at anyway.

mail_quota username

Show the disk usage of an account's mail spool (INBOX). The value is updated every fifteen minutes. 150-MB quotas started on May 15, 2006.

nice

Allows the UC to set a niceness level for a program. (Does not exist on Linux boxes.)

ps options

Lists processes as per the normal ps command. See man ps for details.

quota -v username

List the disk space quota of the given user.

renice

Changes the niceness level (priority) of a program.

shutdown -h time message

Allows for the graceful shutdown of a machine. Also broadcasts a message to all users of that machine in order to inform them of the impending shutdown. For options, see man shutdown.

startfs

Restarts XDM font server on rainbow.

Note

It must be run on rainbow.

startxdm

Starts or restarts an xdm session on the current host. Used when xdm has for some reason failed to restart correctly upon a user logging out, or when the machine becomes hung.

startxdm

Like startxdm, except that is used on machines that are xdm servers (e.g. rainbow) for other machines.

tmp_clean

Cleans stuff out of full /tmp directories. (In /fs/tcc/bin)

tmp_purge

Added to /fs/tcc/bin and to the linux ucsh programs. Unless you have root, you will be able to run it only on linux boxes (primarily to keep people from purging /tmp on rainbow). It only removes files, and will not cross mount points (in case fish ever mounts the sun3 /usr/local partition inside /tmp again). It does not touch /var/tmp at all. If /tmp is not a directory, it will not run. (From wcolburn@nmt.edu Thu Dec 3 08:50:52 1998)

top

Gives process info such as amount of CPU time, amount of memory and nice levels of the processes running on the current machine. Use top to manage processes requiring kill or renice commands to be invoked upon them.

umount

Unmounts a file system. Sun 4 specific. Do a man umount for more info.

unblankconsole

Wrapper that resets the keyboard mode to ASCII and unblanks a console in instances where X hangs and the keyboard sends signals which are insufficient to deactivate the blanker.

unhangconsole

Sun 4 only. Unhangs the console when it has gone completely black and con not be otherwise restored.

volume

Allows the user to reset the volume on a specific machine's /dev/audio. Valid numbers are 0-255.

w

Shows the users logged into a machine and their current processes. Will not show users using rsh or similar methods to run processes off the machine.

whoami

Yields your username.

winlog nodename

From John Weber, Tue Apr 25 10:06:17 2006.

Displays the last MS Window's login for a particular workstation. It displays the username and the time they logged in.

xhang

Wrapper which resets the keyboard mode when X hangs. (Infrequent now due to xdm.)

xdmrestart

Use to start a dead XDM on a Linux or Sun box.