CSE 110 Fall 2009 Help with UNIX Here is a list of some important UNIX commands. Keep all your labs in one directory called cse110. If you are worried about someone copying your programs, change the protection of your folder/directory. See the last command. After you sign onto sparky, you will be in your home directory. Try typing pwd to see what it is. It's name is the same as your login-id. 1. ls Lists files in your current folder. 2. ls -ls will give you a lot more information in a long format. (date of creation, size, ownership etc.) 3. pwd prints the current working directory/folder. (stands for print working directory) 4. cd directory-name change the directory. (stands for change directory.) 5. Just cd will take you to the home directory. (same as your login-id) 6. mv file-name1 file-name2 changes name of file-name1 to file-name2. (Stands for move from one file-name to the other.) 7. rm removes a file from your directory/folder. Be careful when you delete files. 8. javac lab.java compiles the class lab. It creates a file called lab.class 9. java lab Executes lab.class, but we do not mention class on the command line. 10. more file-name will display the named file on your screen. Scroll using space bar, type q to quit. 11. pico file-name will open a window where you can edit the named file. 12. passwd command will change your password. Just follow steps, answer questions. 13. cp file-name1 file-name2 will make a copy of the first file, and store it using the second name. This is different from mv. 14. chmod 700 cse110 will change protection for your folder/directory so that only you have access. To do this you must in a directory above cse110. Or, if you type ls, it should list cse110 as a subdirectory. Remember, in UNIX the directory delimiter is forward slash (`/'), and not backslash (`\'). Also hyphen (`-') is used for command line option.