Interview Q&A / Linux & Shell

INTERVIEW Q&A · 63 QUESTIONS

Linux & Shell interview questions

Permissions, processes, pipes and the commands you are expected to know cold.

  1. What is the difference between cp -r and cp -a?

    cp -r copies directories recursively but new files get fresh timestamps, your ownership and default permissions. cp -a (archive) also preserves permissions, ownership, timestamps and symlinks, so the copy matches the original as closely as possible.

    IntermediateQuick answer1 min read