Linux Commands
Linux File Commands
Mv Command
The mv command is used to move a file or a directory form one location to another location.
Syntax:
- mv <file name> <directory path>
Output:
6. Rename Command
The rename command is used to rename files. It is useful for renaming a large group of files.
Syntax:
- rename 's/old-name/new-name/' files
For example, to convert all the text files into pdf files, execute the below command:
- rename 's/\.txt$/\.pdf/' *.txt
No comments:
Post a Comment