码迷,mamicode.com
首页 > 其他好文 > 详细

[Bash] Move and Copy Files and Folders with Bash

时间:2018-10-12 18:26:32      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:files   folders   span   sso   his   als   bash   ash   under   

In this lesson we’ll learn how to move and rename files (mv) and copy (cp) them.

 

Move index.html to src folder:

mv index.html src/index.html

 

We can also rename the file:

mv a.js b.js  # rename a.js file to b.js
mv src/ lib  # rename src folder to lib 
mv lib/* src/  # move everything under lib folder to src

 

You can also use ‘copy‘:

cp -R lib/* src/  # copy everything under lib to src folder

 

[Bash] Move and Copy Files and Folders with Bash

标签:files   folders   span   sso   his   als   bash   ash   under   

原文地址:https://www.cnblogs.com/Answer1215/p/9779674.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!