CompTIA Linux+ Practice Questions: File Management

11 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering File Management. Each question shows the correct answer and a clear explanation. Ready for the real thing? Take the full timed quiz below.

🚀 Take the full CompTIA Linux+ quiz 📘 CompTIA Linux+ study guide

Q1. Which command lists all files/directories including hidden ones?

Explanation: The -a flag shows all entries, including those starting with . Learn more.

Q2. What command permanently deletes a file?

Explanation: rm removes directory entries (use shred for secure deletion). Learn more.

Q3. What is the purpose of 'rsync -a'?

Explanation: -a enables archive mode (recursive + preserve attributes). Learn more.

Q4. What does 'tar xvzf' do?

Explanation: x=extract, v=verbose, z=gzip, f=file. Learn more.

Q5. What command updates locate database?

Explanation: updatedb refreshes the mlocate database. Learn more.

Q6. Which command changes file timestamps?

Explanation: touch updates access/modification times. Learn more.

Q7. Which command creates a compressed archive using xz?

Explanation: -J uses xz compression (creates .tar.xz file). Learn more.

Q8. What does 'rsync --delete' do?

Explanation: Syncs destination to mirror source exactly. Learn more.

Q9. Which command searches for files by name, type, size, or other attributes?

Explanation: find traverses directories and locates files matching specified criteria. Learn more.

Q10. Which archive command creates a gzip-compressed tar archive?

Explanation: tar -czf creates an archive and compresses it with gzip. Learn more.

Q11. Which command estimates the size of a directory tree?

Explanation: du summarizes disk usage, and -sh gives a human-readable total for a path. Learn more.

More CompTIA Linux+ practice topics