You need to use the mv command. It is used to rename and move files and directories. The general syntax is as follows:
In this example, the following command would rename a file called resumezzz.pdf to resume.pdf. Open a command-line terminal (select Applications > Accessories > Terminal), and then type:Code:mv old-file-name new-file-name mv [options] old-file-name new-file-name mv file1 file2
If resumezzz.pdf is located in /home/vivek/docs/files directory, type:Code:mv resumezzz.pdf resume.pdf
ORCode:cd /home/vivek/docs/files mv resumezzz.pdf resume.pdf
Use the ls command to view files:Code:mv /home/vivek/docs/files/resumezzz.pdf /home/vivek/docs/files/resume.pdf
Code:ls -l file1 ls -l file1 file2 ls -l /home/vivek/docs/files/*.pdf ls -l *.pdf


Reply With Quote

Bookmarks