Eric Brauer
The Midterm will be 90 minutes long, and will cover anything in the summaries at the end of each lecture.
You should be comfortable with:
-r
.find
command to find files and directories.chmod
with both octal and symbolic commands. Using umask
to set defaults.tr
, cut
, sort
, head
and tail
. Using pipes to ‘chain’ these commands together.grep
to find a pattern in a file.Review questions can be found at the end of Lecture 3B and Lecture 5B. The ULG also has a comprehensive midterm review that you might find useful.
Additionally, here are yet even more review questions that you might find useful:
Convert the decimal number 217 to octal.
What is 0xDEC in binary?
How do you know if a file or directory is hidden? How would you list these files and directories?
What find command will match all files on the filesystem that are called report2018 or report2019?
How can you read from a file called cars
, convert everything to upper-case, and redirect that into a file called CARS?
Let’s say that user tstark13
has an account on the server avengers
which is part of the marvel.com
domain. They have a folder called suitv4
in their home directory that they want to save locally. What command will do this?
What will this command do? find ~ -iname file?? > list-of-files 2>&1
Have a look at the contents of the file SSDexample
:
Samsung 860 250 79.99
Samsung 860 500 119.99
Kingston A400 240 52.99
WD Blue 250 74.99
Crucial MX500 500 115.99
Kingston UV500 240 72.99
WD Green 240 59.90
Crucial MX600 1000 194.99
Kingston UV500 120 44.99
Samsung 860Pro 2000 1099.99
Sandisk PLUS 480 144.99
Samsung 850 500 348.12
Crucial M500 480 733.74
Now have a look at the desired output:
What command will accomplish this?
Have a look at this file structure:
/
├── sample_dir
│ ├── admin
│ ├── cambridge
│ │ ├── cafeteria
│ │ └── library
│ │ └── dir_practice
│ ├── faculty
│ ├── markham
│ │ ├── annex
│ │ ├── annex2
│ │ ├── building1
│ │ └── parking
│ ├── outline.doc
│ ├── oxford
│ │ ├── outline.doc
│ │ ├── programming
│ │ │ ├── report.docx
│ │ │ ├── report-final.pdf
│ │ │ └── report.pdf
│ │ ├── report
│ │ └── security
│ ├── stenton
│ │ ├── gen_ed
│ │ │ ├── cars
│ │ │ ├── cars2
│ │ │ └── link-cars
│ │ ├── lib_arts
│ │ │ ├── english.txt
│ │ │ └── match.doc
│ │ └── parking2
│ └── test
└── home
├── cjohnson
└── sam
What command will put you into gen_ed
no matter where you are?
User sam
’s current location is in programming
. What command will they use to move report.pdf
into their home directory?
Your current location is in cambridge
. What command will remove stenton
?