UNIX cheet sheet for CPSC class day Command ssh

Reviews
Shared by: Juan Agui
Stats
views:
5
rating:
not rated
reviews:
0
posted:
4/28/2009
language:
English
pages:
0
UNIX cheet sheet for CPSC 499 class, day 1 Command ssh passwd script ctrl-z kill %1 fg % ls ls –a ls –lh cd fred cd .. cd / cd ~ mkdir alice rmdir fred pwd cp text fred English interpretation open a remote, secure connection change my password save everything I type in a file stop a program get rid of it for good start it up again list files and directories show hidden files show details, such as file sizes change current directory to fred change to one directory “higher” change to “root” directory go to home directory make a new directory, alice delete an existing directory, fred print the directory you’re in copies the file “text” to a file called “text” in the directory fred: If there is no directory called fred: copies the file text to a file called fred If there is already a file called fred: it will be automatically over-written! Move, not copy. Same thing, except it deletes the original file. And same caveat. Deletes the file “text”. Forever. view or edit contents of file “text” nano is not on all UNIX computers, but is almost always available on Linux. see file “text” in screen-size chunks see file with arrows to move about see top of file “text” see bottom of file “text” unzip a .gz compressed file unzip a .zip compressed file un-tar a tar archive get help about program “tar” the blast command run a command with “nice” priority 10 redirect output of “ls” to file “list” file “list” will be overwritten if it already exists! mv text fred rm text nano text more text less text head text tail text gunzip unzip tar –xvf man tar blastall nice –n 10 ls > list UNIX cheet sheet for CPSC 499 class, day 2 top formatdb clustalw hmmpfam hmmbuild hmmsearch grep this text ftp ftp>cd ftp>ls ftp>get ftp>put sftp wget ./configure make see all system processes make a BLAST database perform multiple sequence alignment search protein with pfam database make an hmm from an alignment search a protein file with an hmm find lines matching “this” in file text get a remote file same as unix same as unix get a remote file deposit a file same as ftp but more secure get from a web address GNU compile commands export PATH=$PATH:/home/me/mydir/ adds mydir to your command path chmod ./myscript perl myscript.pl change permissions of a file run a script run a perl script perl –e ‘print “this is a command line script\n”;’ Perl cheet sheet, day 2 #!/usr/bin/perl tells the UNIX shell this is a perl script output text to terminal (NOT printer!) encloses a string (e.g. to print) end of command newline backslash, escape character print “” ; \n \ Perl cheet sheet, day 3 my + * / ** $this = \n \ <> () chomp if {print “a”;} (1 == 1) else elseif == != > >= < <= eq ne die @this split foreach for substr initialize a variable add two things subtract two things multiply two things divide two things raise one thing to the power of another a variable set the variable equal to something a newline the escape character input from the keyboard remove a newline if this is true, do something a conditional block (something to do) an expression (something that might be true) do something else if not true do something else if not true and this is is this number equal to that one? not equal? bigger than? bigger than or equal to? smaller than? smaller than or equal to? is this string the same as that one? is this string different from that one? exit the program safely an array called this split a variable into bits in an array do something for everything in an array do something for some numbers get me part of a string Perl cheet sheet, day 4 %this a hash called this $this{“that”} the part of the hash with key “that” (keys %this) the keys of the hash as an array open INFILE, “file” open a file for reading open OUTFILE, “>file” open a file for writing close INFILE close the file while while an expression is true, do stuff read the file one line at a time $_ the current line in a loop =~ binding operator /this/ regular expression match . any character \d any digit \w any “word” character \s any space \t a tab ^ the beginning of a line $ the end of a line @ARGV where the arguments live use Bio::Perl use a module my @seq_object_array = read_all_sequences($file,'fasta'); get sequences from a fasta my $sequence = $object->seq(); my $name = $object->display_id; system exec `` tr/// s/// reverse the sequence the ID ways of passing commands to the shell ways of passing commands to the shell ways of passing commands to the shell translate substitute reverse order of characters (in string)

Related docs
Unix Cheet Sheet
Views: 1223  |  Downloads: 219
unix-ssh
Views: 2  |  Downloads: 0
CHEET SHEETS Network+
Views: 206  |  Downloads: 11
Cheet Sheets Windows 2000 Server (70-210)
Views: 53  |  Downloads: 3
ssh-tutorial
Views: 58  |  Downloads: 1
UNIX
Views: 246  |  Downloads: 72
UNIX Commands
Views: 633  |  Downloads: 111
Unix Tutorial
Views: 161  |  Downloads: 38
UNIX Cheat Sheet
Views: 64  |  Downloads: 15
Unix command line command cheat sheet
Views: 262  |  Downloads: 57
premium docs
Other docs by Juan Agui
DEMAND OF DELIVERY[1]
Views: 80  |  Downloads: 0
FORM 1099INT INTEREST INCOME 2005
Views: 62  |  Downloads: 0
Treaty of Fort Laramie _1868_ - 1
Views: 102  |  Downloads: 0
Form 8725 Excise Tax on Greenmail
Views: 125  |  Downloads: 0
Pendleton Act _1883_ - 2[1]
Views: 44  |  Downloads: 0
Wade-Davis Bill _1864_ - 2
Views: 83  |  Downloads: 0
SOME ECONOMICS OF WIRELESS COMMUNICATIONS
Views: 338  |  Downloads: 20
FORM 4506 REQUEST FOR COPY OF TAX RETURN
Views: 637  |  Downloads: 6
FORM 4797 SALES OF BUSINESS PROPERTY 2006
Views: 80  |  Downloads: 0