-
Using this tutorial from Software Carpentry, download data-shell.zip folder and extract it to the Desktop.
- Warning: depending on the language settings in your computer your desktop can me named differently (e.g. Plocha in Czech)
For the following questions write answer and code to produce that answer
-
How many folders are there? (Hint: use
ls
with appropriate parameter to print only directories) BONUS: using pipe print just the number of folders -
Move to
molecules
folder indata-shell
. In what folder will you be by typingcd ../..
? -
In
molecules
folder, sort files by file size in descending order (biggest files at top). What is the name of the first file? -
Rename
creatures
directory tonon-existent creatures
. What do you see when you go into thet directory and typepwd
? -
Copy all files from
molecules
directory to north-pacific-gyre. What command will you use? -
Now, put everything as it was before step 5 and 6. What commands will you use?
-
Create empty file and name it
random_stuff.txt
. What command will you use? -
Print the output of
ls -l
of current directory into the file created in previous step. What do you see when you open that file? -
Remove file
random_stuff.txt
. What command will you use? -
BONUS: using pipes create command that:
- Read
data-shell/data/planets.txt
file - Search for
WASP
in file - Sort by second column in descending order
- Print first 5 lines
- Read