July 2018
Beginner
264 pages
8h 9m
English
Let's get ready for the exercise by creating a few text files and directories, and adding some content:
$ cd ~/$ mkdir -p fileops$ touch fileops/empty.txt$ echo "abcd1234!!" > fileops/string.txt$ echo "yieldswordinthestone" > fileops/swordinthestone.txt$ touch fileops/read.txt fileops/write.txt fileops/exec.txt fileops/all.txt$ chmod 111 fileops/exec.txt; chmod 222 fileops/write.txt; chmod 444 fileops/read.txt; fileops/all.txt;chmod 777 fileops/all.txt$ sudo useradd bob$ echo "s the name" > fileops/bobs.txt$ sudo chown bob.bob fileops/bobs.txt
This recipe is about performing some simple file tests and to combine some of the other knowledge from earlier recipes on conditional logic, but with a twist—using user input from the ...
Read now
Unlock full access