How Do I Transfer Files in Linux?

How Do I Transfer Files in Linux?
Contents

How do I move a file in Linux?

Moving on the command line. The shell command intended for moving files on Linux, BSD, Illumos, Solaris, and MacOS is mv. A simple command with a predictable syntax, mv <source> <destination> moves a source file to the specified destination, each defined by either an absolute or relative file path.

How do I copy a file from one directory to another in Linux?

‘cp’ command is one of the basic and most widely used Linux commands for copying files and directories from one location to another.
…
Common options for cp command:

Options Description
-r/R Copy directories recursively
-n Don’t overwrite an existing file
-d Copy a link file
-i Prompt before overwrite
Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.