While investigating file permissions, you run pwd and see /opt/data/current. The directory current is a symbolic link that points to /opt/data/releases/20250720. You need a single command that will move you up one level to the real physical parent directory so that your shell prompt ends up in /opt/data/releases (not the logical path /opt/data). Which cd command should you use?
The -P option tells cd to use the physical directory structure, resolving symbolic links before it processes ... Running cd -P .. therefore first dereferences current to /opt/data/releases/20250720, then moves up one level to /opt/data/releases. The other choices keep the logical path or do not change directories as required: cd .. and cd -L .. follow the logical path and would land in /opt/data, while cd -P . resolves the symlink but stays in the same directory.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a symbolic link in Linux?
Open an interactive chat with Bash
What does the `cd -P` command do specifically?
Open an interactive chat with Bash
What is the difference between logical and physical paths in Linux?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access