mv命令详解_mv命令

mv命令详解

Once you have a file, you can move it around using the mv command. You specify the file current path, and its new path:

有了文件后,可以使用mv命令在文件中移动。 您指定文件的当前路径及其新路径:

touch test
mv pear new_pear

The pear file is now moved to new_pear. This is how you rename files and folders.

pear文件现在移至new_pear 。 这是重命名文件和文件夹的方式。

If the last parameter is a folder, the file located at the first parameter path is going to be moved into that folder. In this case, you can specify a list of files and they will all be moved in the folder path identified by the last parameter:

如果最后一个参数是文件夹,则位于第一个参数路径的文件将被移动到该文件夹​​中。 在这种情况下,您可以指定文件列表,所有文件都将移至最后一个参数标识的文件夹路径中:

touch pear
touch apple
mkdir fruits
mv pear apple fruits #pear and apple moved to the fruits folder

This command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

此命令可在Linux,macOS,WSL以及您拥有UNIX环境的任何地方使用

翻译自: https://flaviocopes.com/unix-command-mv/

mv命令详解

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值