# Activity 7 - What's wrong with the file?

Workshop Resources

Malware can be dangerous! Don’t open it right away! Instead let’s use the command line to take a peek.

### How can we look at the first lines of the file?

Sometimes you just need to look at the beginning of a file. The command head shows the first line of a file.
The format is: head [filename]

Try to look at the first 5 lines of malware.sh!

### How can we look at the last lines of the file?

Sometimes you just need to look at the end of the file. The command tail shows the last line of a file.
The format is: tail [filename]

Try to look at the last 5 lines of malware.sh!

### How can we look at the whole file?

Sometimes looking at the first and last lines of the file allow us to realize we need to view the whole file to understand what it is doing and what we should do about it. Let’s look at the entire contents of malware.sh!

cat shows the contents of a file.
The format is: cat [filename]

What do you think malware.sh does? Add it to your report!