Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From where i can find the source code of cp command? [closed]

See, I want the cp command on Android but it doesn't exist so I want to cross compile the source of cp.

Linux has cp command, then from where can I find the code of cp?

like image 441
Jeegar Patel Avatar asked Jul 13 '12 08:07

Jeegar Patel


People also ask

How do I find the source code in Linux?

To get coreutils' source code, use sudo apt-get source coreutils . It's important to know that commands are nothing more than binaries placed in the paths of the PATH environment variable. These binaries are usually written in C.

What is the command for cp?

Use the cp command to create a copy of the contents of the file or directory specified by the SourceFile or SourceDirectory parameters into the file or directory specified by the TargetFile or TargetDirectory parameters.

How copy file without using cp command in Linux?

To move files, use the mv command (man mv), which is similar to the cp command, except that with mv the file is physically moved from one place to another, instead of being duplicated, as with cp.


1 Answers

It is missing on my android as well.

You can work around by using:

  cat source > dest
like image 68
Nils Pipenbrinck Avatar answered Oct 18 '22 23:10

Nils Pipenbrinck