Remember, man <command> is your best friend!

Basic File Handling

List files in a directory:
ls
List ALL files in a directory (including hidden):
ls -a
List files and details:
ls -l
Delete a file:
rm <filename>
Move a file:
mv <source> <destination>
Copy a file:
cp <source> <destinateion>

Printing

Print a document:
lpr -P <printer_name> <document_name>
View Printer Queue:
lpq -P <printer_name>
View Printer Quuee (short way):
lpstat <printer_name>
View Print Quota:
print-quota <username>
Remove Job from Printer Queue (must be on printman):
sudo lprm -P <printer_name> <job_number>
Remove ALL jobs from Printer queue (must be on printman):
sudo lprm -P <printer_name> all
Restart Printer Queue (must be on printman):
sudo lpc kill <printer name>
Redirect a printer (must be on printman):
sudo lpc redirect <source_printer> <destination_printer>

User Management

Password file entry:
ypcat passwd | grep <username>

If the first two letters ofthe password field match the first two letters
of the username, the password is still the default

DEFAULT in the password file means the password wasn't
changed from the default for more than 2 weeks. We can reset it but
user must change it in SOC.

NTONLY means the user can only login to Windows, not Unix.

Reset password (must be on norm):
sudo pwreset <username>
View disk quota (you may have to finger the user first)
sudo quota -v <username>
Find large files (user's home directory can be found in the password file)
find <home directory> -size +100000c
View group memberships:
groups <username>

Other Useful Stuff

Change shell:
passwd -r nis -e

Last mangled: 4 November 2007