Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Unix programming?
Commands don’tneedto be efficient. If your current directory is /usr/local/games/, and you were to run the command cd ./.././../local/../local/games/., what directory would youend up in? (Give the absolute file path.)
3 Answers
- ?Lv 72 months ago
you need to understand what the dot and double dot mean. go back and read up, as it is VITAL!
- husoskiLv 72 months ago
A single . doesn't go anywhere, so those can be removed. The path is equivalent to ../../local/../local
Then, "going into" a directory (the first "local/") and then going back out again with ../ does nothing, so you can remove that. Now it's equivalent to ../../local
And since . is /usr/local/games/ to begin with, then ../../ is the same as /usr/, so the final spot you land is in /usr/local/
- i + iLv 72 months ago
The starting directory is "/usr/local/games/"
. <-- the current directory (/usr/local/games/)
/.. <-- up one directory (/usr/local/)
/. <-- again, the current directory (now /usr/local/)
/.. <-- up one more directory (/usr)
/local <-- back down to local (/usr/local/)
/.. <-- and back up on (/usr)
local/games/ <-- puts you right back where you started.