Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of Linux's mren command

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge of this article "what is the use of Linux's mren command", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article, "what is the use of Linux's mren command?"

The inux mren command is used to change the name of a MS-DOS file or directory or to move a file or directory. Mren is a MS-DOS tool instruction, which is similar to the ren instruction under DOS and can be used to change the name of the MS-DOS file or directory. The source file must be a file that already exists on the disk. If the drive letter and path are ignored, it represents the current disk and the file in the current directory. The new file name is the name of the file to be replaced. The new file name cannot be preceded by a different drive letter and path from the source file, because this command can only change the file name on the same disk.

Syntax mren [source file or directory.] [target file or directory] parameter description:

[source file or directory.] : the name or path of the source file to perform the operation [destination file or directory]: the name or path of the target file to perform the operation

Example

Change the file name of the file "autorun.bat" under disk a to "auto.bat" using the instruction mren, and enter the following command:

$mren a:\ autorun.bat auto.bat # rename the file autorun.bat to auto.bat

Before and after using this command, use the mdir command to view and compare, and the results are as follows:

$mdir-/ a:\ * # View the file Volume in drive A has no label # loading information in disk a Volume Serial Number is 13D2~055C Directory for A:\ # below is the directory information. / TEST 2011-08-23 16:59 # file name, directory size Modification time AUTORUN.BAT 43 2011-08-23 16:56 3 files 308 bytes # Total size 724 325 bytes free # remaining space # rename the file autorun.bat to auto.bat $mren a:\ autorun.bat auto.bat $mdir-/ a:\ * # check the file Volume in drive A has no label on disk an again # loading information Volume Serial Number is 13D2~055C Directory for A:\ # the following is directory information. / TEST 2011-08-23 16:59 # File name directory size modification time # File name was changed to auto.bat The modification time is changed to the current system time AUTO.BAT 43 2011-08-23 16:56 3 files 308 bytes # Statistics Total size 724325 bytes free # the remaining space is about the content of this article "what is the use of Linux's mren command". I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report