How To Copy Files and Directories in the Linux terminal

Copies of cyborg penguins
(Image credit: Pexels / OpenClipArt)
0

Copying files and directories in the Linux terminal is really efficient and straightforward once you know how to do it. It’s useful when we need to manage our files and directories without the need for a GUI, for example in a BASH script. We can do this whether we are at our desk or if we are accessing a machine remotely via SSH.

In this how-to we’ll look at the cp command which copies files and directories. We’ll look at some arguments that we can add to get the most out of this command.

Latest Videos FromTom's Hardware
TOPICS
Jo Hinchliffe
Contributing Writer

Jo Hinchliffe is a UK-based freelance writer for Tom's Hardware US. His writing is focused on tutorials for the Linux command line. From PCBs to rowing boats to rockets, Jo tries wherever possible to integrate open source hardware and software into his projects. As such he is a keen Linux user, has authored a book on FreeCAD the open source 3D modeling software, and has published designs and tutorials across a wide range of makes.

With contributions from