You can copy/move file in linux using cp/mv command.
To copy file:
Syntax:
To move file:
Syntax:
Note: You can also use mv command to rename file
To copy file:
Syntax:
- cp [options] <source file> <destination file>
- cp [options] <source path of file> <destination path of file>
- cp file1 file2
- cp /tmp/file1 /data/file2
To move file:
Syntax:
- mv [options] <source file> <destination file>
- mv [options] <source path of file> <destination path of file>
- mv file1 file2
- mv /tmp/file1 /data/file2
Note: You can also use mv command to rename file
No comments:
Post a Comment