加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

[Bash] Move and Copy Files and Folders with Bash

发布时间:2020-12-15 23:23:14 所属栏目:安全 来源:网络整理
导读: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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读