You need to use the mv command. It is used to rename and move files and directories. The general syntax is as follows:
Code:
mv old-file-name new-file-name
mv [options] old-file-name new-file-name
mv file1 file2
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 resumezzz.pdf resume.pdf
If resumezzz.pdf is located in /home/vivek/docs/files directory, type:
Code:
cd /home/vivek/docs/files
mv resumezzz.pdf resume.pdf
OR
Code:
mv /home/vivek/docs/files/resumezzz.pdf /home/vivek/docs/files/resume.pdf
Use the ls command to view files:
Code:
ls -l file1
ls -l file1 file2
ls -l /home/vivek/docs/files/*.pdf
ls -l *.pdf
Bookmarks