zl程序教程

您现在的位置是:首页 >  其它

当前栏目

[Bash] Move and Copy Files and Folders with Bash

and with Bash Files copy move
2023-09-14 09:00:49 时间

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