| . | denotes current directory; e.g. cp /usr/test.dat . will copy file to current directory |
| * | will match any filename; e.g. rm * will remove all files |
| ? | will match one character in a filename; e.g. rm data.? will remove data.1 |
| \ | interpret the next character as a literal; e.g. mv andor and\/or |
| cat file1 | display file1 |
| cat file1 file2 > newfile | combines file1 and file2 into newfile |
| cat file1 >> file2 | append file1 to file2 |
| cd | return to the home directory |
| cd .. | move up one directory level |
| cd ../.. | move up two directory levels |
| cd directory | move to directory one level down |
| chmod u+w filename | add write permission for the user to file1 |
| chmod g+x filename | add execute permission for the group to file1 |
| chmod o-r filename | remove read permission for the world from file1 |
| chmod 700 filename | allow rwx permissions for owner only on file1 |
| cp file1 file2 | copy file1 to file2 |
| cp file1 directory | copy file1 into specified subdirectory |
| cp file1 file2 directory | copy two files into specified directory |
| cp -r dir1 dir2 | copy all files and subdirectories in dir1 into dir2 |
| cp ../dir/file . | copies file1 from a sister directory into current directory |
| echo $PATH | display value of environmental variable such as $TERM, $SHELL, $HOME |
| grep string *.c | Will find all instances of string in all files ending with .c in current directory |
| kill pid | gracefully kills the specified process. obtain pid from ps |
| kill -9 pid | ungracefully kills the process |
| id | display user's system identity |
| logout or exit or CTRL-D | terminates a session |
| ln -s /pathname/file1 | creates a symbolic soft link to file1 named file1 in the current directory |
| ln -s /pathname/dir1 | creates a symbolic soft link to dir1 named dir1 in the current directory |
| logout or exit or CTRL-D | terminates a session |
| lpr -P printer filename | prints file to the specified printer.e.g. lpr -Pcstext lab5.txt |
| ls | more | lists a directory in columns one page at a time |
| ls -l | gives a fuller listing including file permissions, size, date created |
| ls -al | similar to the above but includes "dot" files |
| man command | display reference manual for command. hit 'q' to quit or SPACE to continue |
| man -k keyword | shows all of the man pages that contain keyword |
| man command | col -b | lpr -Pprinter | Prints out the specified man page |
| mkdir subdirectory | create a subdirectory in the current directory |
| more filename | list file one screen at a time. press SPACE to continue; press q to cancel |
| mv oldfile newfile | rename file |
| mv old_dir new_dir | rename directory |
| mv dir1 dir2 | move dir1 into dir2 |
| mv file1 file2 dir | move specified files into directory |
| passwd | change password |
| ps | list all processes for the current user and their status |
| ps au | list all processes for all users and some extra status information |
| pwd | print current working directory |
| rm filename | delete the specified file |
| rm -i filename | deletes the file after confirmation |
| rm -rf directory | remove the directory and all files and directories contained within |
| rmdir directory | removes directory if empty |
If a program is locked up execute ps -ef | grep username (this lists all your processes). From here, find the PID of the offending process (the second column in the output), and do a kill (-9 if needed) pid. If the terminal
you are working on is locked up, open a terminal session from do the same from there.
Pegasus security prevents users from executing ~ (to specify your root directory) and chsh (to change your shell).