Unix Command Summary ls List all files and directories in the current directory. ls -l Do listing in long form, giving additional information such as file lengths, read/write/execute privileges. ls -a List all files, including hidden files. cd name Change directory to the indicated directory. cd Change to the login directory cp f1 f2 Copy file f1 to file f2 clear Clear the screen cc f1 Compile a C program and create an executable named "a.out" gcc f1 Compile a C program and create an executable named "a.out" gdb f1 Debug the executable file named f1 mv f1 f2 Move file f1 to file f2. When in the same subdirectory, rename f1 as f2. pwd Print working directory. exit Logout javac f1 compile a Java source file java f1 run a compiled Java file jdb f1 debug a Java program chmod Change the read/write/execute privileges of a file. rm file Remove (delete) the indicated file or files. cat file Print the indicated file to the terminal window. mkdir name Create a subdirectory with the given name. rmdir name Remove (delete) the indicated subdirectory [It must be empty]. man command Give help information for the given command. man -k keywd Give all commands referring to the given keyword. setenv Set environment variables. printenv Print all environment variables. ps -ef List current running processes. kill Used to kill current processes. alias Used to define new command names or macros. To see the current names set using alias, simply type alias and a carriage return. & Execute a program as a background process telnet Used to log into another account and/or computer. ftp Used to transfer files between accounts and/or computers.