Difference between revisions of "Talk:Bklein7 Week 3"

From LMU BioDB 2015
Jump to: navigation, search
(Added notes from the in-class discussion)
 
(Added comment on how to create text files using the command line)
Line 26: Line 26:
 
****"..." any character
 
****"..." any character
 
****"&" what you just found
 
****"&" what you just found
 +
**Aside: creating a new text file
 +
***echo 'text' >''filename.txt''
 +
 
==Putting Commands Together==
 
==Putting Commands Together==
 
* vertical bar ( | ) used to link commands together
 
* vertical bar ( | ) used to link commands together

Revision as of 00:32, 16 September 2015

  • 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
  • Ways to access dondi's data folder
    1. cd /nfs/home/dondi/xmlpipedb/data
    2. cd ~dondi/xmlpipedb/data