How to Copying/Renaming/Deleting a file in unix?

How to Copying/Renaming/Deleting a file in unix?

Senior Developer Asked on December 7, 2017 in UNIX.
Add Comment
1 Answer(s)

Copying a File:
To make a duplicate copy of a file, use the command cp.
cp <source> <destination>

So if you want to copy the file hello.txt to the directory Downloads, just type:


cp hello.txt Downloads

Renaming Files:
To change the name of a file, use the following command format


mv hello.txt hi.txt

Deleting Files:
Deleting files and directories with the rm command.


rm demo.txt

Team Leader Answered on December 31, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.