Required Linux Commands Syntax Example Description man {command} man ls manual for the command man -k {word} man -k list commands related to that word. ls {path} ls lists files in current directory ls -l {path} ls -l long listing of files in current directory ls -a {path} ls -a listing includes . files cd {dirname} cd 274/projects changes working directory cd ~ cd ~ go to home directory cd .. cd .. go up one level mkdir {dirname} mkdir projects creates a new directory rmdir {dirname} rmdir projects removes an empty directory rm -r {dirname} rmdir -r projects removes all files and subdirectories pwd pwd displays working directory cp {file1} {file2} cp t.java 274/t.java copies a file cat {file} cat t.java lists a file on the terminal cat {newfile} >> {oldfile} cat t1.java >> t.java appends newfile to the end of oldfile mv {oldfile} {newname} mv t.java 274/t.java moves oldfile to newname more filename more t.java view file one screen at a time pico {filename} pico t.java edit t.java * ls t* * matches any string of characters {command} > {file} java test > out directs the output of the command to the file {command} | {command} ls | more Pipes the first command output to second's input telnet {ip address} telnet heart.cecs.csulb.edu connect to CECS computer ssh linux ssh linux connect to linux from heart chmod 644 {filespec} chmod 644 t.java read, write for you-- read for group and anyone chmod 755 {filespec} chmod 755 MyShare read, write, execute for you -- read, execute for rest Pico commands Control O write text to a file Control X exit Control K delete the line the cursor is on Permissions Ten binary digits in four groups _ ___ ___ ___ The first digit is one for a directory and 0 for a file. The next three groups of three digits each are for you, your group, and anyone. In each group the first digit is for read, the second is for write, and the third is for execute. A one gives permission and a zero denies it. For example 0 110 100 100 is a file that gives you read and write permission, your group read permission, and everyone else read permission. Use ls -l to see the permissions. Use chmod to change permissions. When using chmod we write each group of three digits in decimal (or octal), so 110 100 100 would be 644, thus the command is chmod 644 {filespec}.