[Linux] Copy Directory with cp -a Command

Tadashi Shigeoka ·  Sat, January 25, 2014

I’ll introduce the option for copying directories with the cp command.

Linux

The cp command alone can copy individual files but can’t copy directories. Adding the -a option allows you to copy entire directories while preserving their structure.

cp -a target_dir copy_dir

That’s all from the Gemba.

Reference Information