2 Week 1 Exercises
2.1 In class code examples
- Clone the
bash_for_biorepository into your home directory:
git clone https://github.com/fhdsl/bash_for_bioChange directories:
cd bash_for_bio- Try checking the disk usage using
dufor thebash_for_biofolder in your/homedirectory (mine is/home/tladera2/bash_for_bio).
du -d 1 -h /home/tladera2/bash_for_bio/Try out using du -d -h 2 on your home directory:
du -d 2 ~/What are the permissions for the GitHub repo (bash_for_bio) that you just downloaded?
Copy the script
tell_the_time.shin thescripts/week1/directory to the top directory ofbash_for_bio. Make the script executable. Run the script.
#put code here- Try making your own file called
my_file.txt:
nano my_file.txtAdd some text to it.
Use CTRL-X to exit, and make sure to select “Yes” to save.
- Change permissions for the
scripts/folder:
chmod -R 700 scripts/2.2 Homework Exercises
All exercises are required for the badge.
- Use
duto check the disk usage of two folders in your/bash_for_biodirectory. Set the depth (-d) option to 1. Put your code in the box below
du -d 1 -h -------- Copy a file from the
scripts/week1/directory inbash_for_bio/to your own home directory.
/home/tladera2/bash_for_bio/scripts/week1/run_this.sh
Check the permissions. If necessary, change the script to read/write/executable for yourself:
chmod --- run_this.sh
Try running it in your home directory - did it work?
./run_this.sh
- (pick python or R) Take a look at
scripts/week1/rnorm.Rorscripts/week1/random_num.py. Load up thefhRorfhPythonmodules onrhinousingmodule load. Run it on the command line withRscriptorpython3.
Did you need to make this script executable before you ran it?
module load _____
--------
module purge