Happy Birthday Linux! Here's your cake:
For this class we suggest all of you to run the codes on your own machines. Getting to install the requisites is a part of the learning process.
For linux users- Use the system package manager (apt) and the python package manager (pip) to install additional software. sudo runs a command with super user privileges.
Macs also have a built-in commandline (Terminal.app). Many of the packages we use are also available of OS X. MacPorts is most convenient for installing software (https://www.macports.org), but not all packages that we use are readily available.
As of Windows 10, can install Linux Subsystem. In theory should work just like Ubuntu and is much less cumbersome to use.
Distribution of python and R programming languages. Preffered for simplified package management and deployment. Users can install Anaconda from (https://www.anaconda.com/)
We recommend everyone to use the Microsoft Visual Studio Integrated Development Environment for python coding in Linux, Windows and macOS.
We will direct you to specific packages/softwares that needs to be installed for each class.
%%html
<div id="prepared" style="width: 500px"></div>
<script>
jQuery('#prepared').asker({
id: "cdquestion2",
question: "Do you have the bash shell or PuTTY installed?",
answers: ["No","Yes, PuTTY","Yes, Windows BASH","Yes, MacOS"],
server: "http://bits.mscbio2025.net/asker.js/example/asker.cgi",
charter: chartmaker})
$(".jp-InputArea .o:contains(html)").closest('.jp-InputArea').hide();
</script>
The first word you type is the program you want to run. bash will search PATH environment variable for an appropriately named executable and run it with the specified arguments.
$ ls -l total 8 -rw-rw-r-- 1 anupam06 anupam06 5 Aug 29 13:05 hello.txt drwxrwxr-x 2 anupam06 anupam06 4.0K Aug 29 13:03 lecture $ pwd /home/anupam06/intro $ cd lecture/../.. $ pwd
%%html
<div id="question1" style="width: 500px"></div>
<script>
jQuery('#question1').asker({
id: "cdquestion",
question: "What prints out?",
answers: ["~/","/home/anupam06", "/home/anupam06/intro","/home/anupam06/intro/lecture","An Error"],
extra: ["","","","","",""],
server: "http://bits.mscbio2025.net/asker.js/example/asker.cgi",
charter: chartmaker})
$(".jp-InputArea .o:contains(html)").closest('.jp-InputArea').hide();
</script>
$ ls -lah total 16K drwxrwxr-x 3 anupam06 anupam06 4.0K Aug 29 13:05 . drwxr-xr-x 15 anupam06 anupam06 4.0K Aug 29 13:02 .. -rw-rw-r-- 1 anupam06 anupam06 5 Aug 29 13:05 hello.txt drwxrwxr-x 2 anupam06 anupam06 4.0K Aug 29 13:03 lecture$ ls *.txt
%%html
<div id="question2" style="width: 500px"></div>
<script>
jQuery('#question2').asker({
id: "lsquestion",
question: "What prints out?",
answers: ["hello.txt","*.txt", "hello.txt lecture", "An Error"],
extra: ["","","","","",""],
server: "http://bits.mscbio2025.net/asker.js/example/asker.cgi",
charter: chartmaker})
$(".jp-InputArea .o:contains(html)").closest('.jp-InputArea').hide();
</script>
du - disk usage of files/directores
[dkoes@n052 tmp]$ du -s
146564 .
[dkoes@n052 tmp]$ du -sh
144M .
[dkoes@n052 tmp]$ du -sh intro
4.0K intro
df - usage of full disk
[dkoes@n052 tmp]$ df -h . Filesystem Size Used Avail Use% Mounted on pulsar:/home 37T 28T 9.3T 75% /net/pulsar/home
locate -find a file system wide
find -search directory tree
which -print location of a command
man -print manual page of a command
NAME=value set NAME equal to value No spaces around equals
user@python$ X=3
user@python$ echo $X
3
user@python$ X=hello
user@python$ echo $X
hello
user@python$ echo X
X
%%html
<div id="questionvarprint" style="width: 500px; "></div>
<script>
jQuery('#questionvarprint').asker({
id: "varquestion",
question: "Which does <b>not</b> print the value of X?",
answers: ["echo $X","echo ${X}","echo '$X'","echo \"$X\""],
extra: ["","","","","",""],
server: "http://bits.mscbio2025.net/asker.js/example/asker.cgi",
charter: chartmaker})
$(".jp-InputArea .o:contains(html)").closest('.jp-InputArea').hide();
</script>
history show commands previously issued
up arrow cycle through previous commands
Ctrl-R search through history for command AWESOME
.bash_history file that stores the history
make a nickname for a command $ alias l='ls -l' $ alias $ l
%%html
<div id="stringm" style="width: 500px"></div>
<script>
$('head').append('<link rel="stylesheet" href="http://bits.csb.pitt.edu/asker.js/themes/asker.default.css" />');
jQuery('#stringm').asker({
id: "stringm",
question: "What prints out?",
answers: ["ovolo","volo", "ovol","vl","An Error"],
server: "http://bits.mscbio2025.net/asker.js/example/asker.cgi",
charter: chartmaker})
$(".jp-InputArea .o:contains(html)").closest('.jp-InputArea').hide();
</script>
for file in *.png do convert $file ${file%.png}.tif done