---
# System prepended metadata

title: Intro - Bash - BHS
tags: [Validated]

---

# Intro - Bash - BHS
###### tags: `Validated`
## 1. Starting from /Users/amanda/data, which of the following commands could Amanda use to navigate to her home directory, which is /Users/amanda?
cd ..
cd
cd /Users/amanda
cd ~

## 2.1. Based on the previous diagram, if pwd displays /Users/things, what will ls -F ../backup display?

a) ../backup: No such file or directory


## 2.2. Using the filesystem diagram, if pwd displays /Users/backup, and -r tells ls to display things in reverse (alphabetical) order, what command(s) will result in the following output:

b) ls -rF
c) ls -rF /Users/backup



## Exercise 3 After running the following commands, Jamie realizes that she put the files sucrose.dat and maltose.dat into the wrong folder. The files should have been placed in the raw folder.*

mv sucrose.dat maltose.dat ../raw/


## Exercice 4 What is the output of the closing ls command in the sequence shown below:
  b) recombine


## Exercice 5 : Copy with Multiple Filenames In the example below, what does cp do when given several filenames and a directory name?
### $ mkdir backup
### $ cp amino-acids.txt animals.txt backup/

### make a copy of those two files on the directory `backup`

### What does cp do when given three or more filenames?
cp used with two simply overwrites the file on the `destination`, i.e one-on-one copy. In the case of three or above, the last one needs to be a directory

## Exercise 6: List filenames matching a pattern When run in the proteins directory, which ls command(s) will produce this output?
c) ls *t??ne.pdb


## Exercise 7 : Renaming files Suppose that you created a plain-text file in your current directory to contain a list of the statistical tests you will need to do to analyze your data, and named it: statstics.txt

 mv statstics.txt statistics.txt


