Bird
0
0

You want to send a large directory over the network efficiently. Which command sequence best reduces bandwidth usage?

hard📝 Application Q9 of 15
Linux CLI - Archiving and Compression
You want to send a large directory over the network efficiently. Which command sequence best reduces bandwidth usage?
Ascp directory/ user@host:/path
Bgzip directory/ && scp directory.gz user@host:/path
Ctar -czf archive.tar.gz directory/ && scp archive.tar.gz user@host:/path
Dcp -r directory/ /backup
Step-by-Step Solution
Solution:
  1. Step 1: Understand directory compression

    gzip alone cannot compress directories; tar archives first.
  2. Step 2: Efficient transfer

    Compressing directory into archive reduces size, then scp sends smaller file.
  3. Final Answer:

    tar -czf archive.tar.gz directory/ && scp archive.tar.gz user@host:/path -> Option C
  4. Quick Check:

    Archive then compress before sending = B [OK]
Quick Trick: Archive and compress directories before transfer [OK]
Common Mistakes:
  • Trying to gzip directories directly
  • Sending uncompressed directories with scp
  • Copying locally instead of transferring

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes