UNIX COMMANDS FOR NON-UNIX STUDENTS This summary is provided for those students who need a short list of unix commands that are in common use. Note that options on unix commands normally follow a hyphen. Many commands use filenames. You can use up to 14 characters for filenames (more for many commands). The filename can contain any number of digits, letters, dots or other non-numeric, non-letter characters. Generally, you should avoid creating a file whose name starts with a dot unless you are specifcally trying to create a system file. To get complete information on any command, simply enter: man command passwd change your logon password cp oldfile newfile copy a file cp oldfile1 oldfile2 newdir copy files into a different directory, keeping the same names. rm file1 file1 remove (delete) a file or more ls present a list of the files and directories in your current directory ls -a same as above, but include the dot files ls -l make a long listing (one line of info/line) ls -F indicate filetype, adds "/" after directory names; "*" after executables. ls ab* make a list of all files that start with ab cat file1 send contents of file1 to screen cat file1 | more same as above, but output from cat "piped" to more, which put one screen on info at a time. Press spacebar for next screen more file1 same as above cat file1 >file2 send contents of file1 to file2 cat >file2 expects input from your keyboard. Lines will be sent to file2. Terminate with ^d mkdir dir1 makes a directory called dir1 rmdir dir1 removes a directory dir1. (only works if dir1 has no files or subdirectories lp -d iclpr1 file1 sends file1 to the first printer in ICL-1 mv file1 file1 renames file1 as file2 ln -s /dir1/dir2/file1 file2 lets us refer to file1 by typing file2 who tells us who is logged on ps tells us which programs are running date gives us the date and time pwd tells us the path to our current directory grep string1 file1 file2 looks for string1 in both files head -30 file1 shows the first 30 lines of file1 tail -20 file1 shows the last 20 lines of file1 uncompress file1.Z uncompress file1.Z and put result in file1 compress file2 compress the information in file2 and put the result in file2.Z zcat file1.Z uncompress file1.Z but pipe output to standard output instead of using disk space. (Useful to view the start of a large compressed file before uncompressing it completely.) chmod a+r file1 put read permission for everyone on file1 chmod a+ file1 put execute permission for everyone on file1