Rename Files and Directories (Add Prefix)

后端 未结 10 1130
谎友^
谎友^ 2020-12-22 14:54

I would like to add prefix on all folders and directories.

Example:

I have

Hi.jpg
1.txt
folder/
this.file_is.here.png
another_folder.ok/
         


        
10条回答
  •  清酒与你
    2020-12-22 15:34

    This could be done running a simple find command:

    find * -maxdepth 0 -exec mv {} PRE_{} \;
    

    The above command will prefix all files and folders in the current directory with PRE_.

提交回复
热议问题