Linux Mv Commands - www.studyandupdates.com

Sunday

Linux Mv Commands

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:

  1. 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:

  1. rename 's/old-name/new-name/' files  

For example, to convert all the text files into pdf files, execute the below command:

  1. rename 's/\.txt$/\.pdf/' *.txt  


Output:











No comments:

Post a Comment

Popular Posts