A colleague writes: "The site config is in config/site.conf, check which port it uses." Open the file by that path and see what happens.
Start on the card creates the practice directory ~/path-lab and takes you there. A config is a file with a program's settings, and cat prints a file's contents to the screen.
Check the config at your colleague's path
You are in ~/path-lab. Run the three commands one by one and compare what the two identical cat commands print.
First, predict
Your colleague is sure the file is there. What will the first cat config/site.conf print?
Now start the exercise, run the command and compare your prediction with the output.
Why did the same cat config/site.conf fail to find the file at first and find it after cd project?
-
The Start button created the file, before the first
cat.cdcreates no files. -
cddoes not change permissions. Without read accesscatwould printPermission denied, and it printedNo such file or directory. -
catremembers nothing between runs. Go back withcd ~/path-laband repeat the firstcat— the file is "missing" again.
cd project decided it: the path config/site.conf is counted from the current directory, and cd changed it.