Talk:Bklein7 Week 3
From LMU BioDB 2015
								Revision as of 00:32, 16 September 2015 by Bklein7 (Talk | contribs) (Added comment on how to create text files using the command line)
- Accessing the cs lmu system:
 
my.cs.lmu.edu - in putty.exe ssh username@my.cs.lmu.edu - in terminal
Commands
- Exit
 - pwd : "print working directory" - shows the path to your current directory
 - ls : "list files"
- blue- folders, white- documents
 
 - cd <name>: "change directory"
- <name> = .. allows you to go up one directory
 
 - cat <filename> : shows contents of a file
 - more <filename> : shows truncated file contents that allows you to page around
- space- page down
 - b- page up
 - q- quit truncated view
 
 - wc <filename> : word count of a file
- display: lines / words / characters
 
 - grep "searchterm" <filename> : search for text
- exclusively searchterm - " searchterm "
 - searchterm at end of line - "searchterm$"
 - searchterm at beginning of line - "^searchterm"
 
 - sed : replacing text
- "s/<searchtext>/<replacetext>/g" <filename> : one time search and replace (words)
 - "y/<unqiuecharacters>/<newuniquecharacters>/" : letter by letter replacement
 - sed "s/.../& /g" <filename> to group sequence into codons
- "..." any character
 - "&" what you just found
 
 
 - Aside: creating a new text file
- echo 'text' >filename.txt
 
 
Putting Commands Together
-  vertical bar ( | ) used to link commands together
- ex. grep "King" movie_titles.txt | sed s/King/Queen/g
- not necessary to reiterate file name, as you want the first command to act ONLY on the text of the second
 
 
 - ex. grep "King" movie_titles.txt | sed s/King/Queen/g
 
- Ways to access dondi's data folder
- cd /nfs/home/dondi/xmlpipedb/data
 - cd ~dondi/xmlpipedb/data