linux 的shell实现目录复制,求 shell 脚本: 将当前目录下的所有文件夹复制到指定目录...
-_-18:30:59$lsCHANGELOG.txthelppluginsviews.infocssimagesREADME.txtviews.installdocsincludestests...
-_-
18:30:59 $ ls
CHANGELOG.txt help plugins views.info
css images README.txt views.install
docs includes tests views.module
documentation-standards.txt js theme views_ui.info
drush LICENSE.txt views3.doxy views_ui.module
handlers modules views_export
18:30:59 $ mkdir ../test-target
18:31:11 $ echo */
css/ docs/ drush/ handlers/ help/ images/ includes/ js/ modules/ plugins/ tests/ theme/ views_export/
18:31:16 $ cp -av */ ../test-target/
"css/" -> "../test-target/css"
"css/views-list.css" -> "../test-target/css/views-list.css"
"css/views-rtl.css" -> "../test-target/css/views-rtl.css"
"css/views-admin.css" -> "../test-target/css/views-admin.css"
"css/views-list-rtl.css" -> "../test-target/css/views-list-rtl.css"
"css/views-tabs.css" -> "../test-target/css/views-tabs.css"
...
18:31:24 $ ls ../test-target/
css drush help includes modules tests views_export
docs handlers images js plugins theme
【 在 chs513 (凌狐) 的大作中提到: 】
: 目标: 将当前目录下的所有文件夹复制到指定目录. 复制的过程要在屏幕上显示出来.
: 我自己想的: find . -type d | xargs -i cp -r {} /usr/share/fonts
: 此命令没有达到预期效果. 请赐教.
: ...................
更多推荐
所有评论(0)