Copying files ... with style 0 ▲ Case Duckworth 1 day ago · Tech · hide · 0 comments The venerable cp command is well-known to any Unixer. Whether you want to copy one file or a whole tree recursively, cp is always available and always ready to help. However, as with most things in life there is more than one way to cp the cat. In this article, I’m going to explore some alternatives to cp that you can use … if you dare. Copying single files Copying files to other files, or into a new directory, is fairly simple. All you need to do is ensure that the bytes in file A are replicated in file B, creating B if necessary. Copying multiple files from one directory to another is a little more complicated, but only a little. File → File In each of these examples, FROM is the source file and TO is the destination file: dd if=FROM of=TO — you can even add status=progress to see how much is copied at a time! cat <FROM >TO, cat FROM >TO — cat isn’t just for text files. curl -o TO file://localhost/FROM — curl isn’t just for http(s), ftp(s), dict, gopher(s), imap(s), ldap(s), mqtt,… No comments yet. Log in to reply on the Fediverse. Comments will appear here.