bash copy multi files
bash copy multi files
# copy one file
$ cp file1.js /var/www/html
# copy multi files ??? no space
$ cp file1.js,file2.js /var/www/html
# space error
$ cp file1.js file2.js /var/www/html
macOS zsh ???
$ cp file1.js file2.js folder


$ cp /home/usr/dir/{file1,file2,file3,file4} /home/usr/destination/
$ cp /home/folder/{file1,file2} /home/destination/
https://askubuntu.com/questions/327282/copying-multiple-specific-files-from-one-folder-to-another
for loop
# test
$ for file in ABC.*; do echo cp "$file" "${file/ABC/DEF}";done
# copy
$ for file in ABC.*; do cp "$file" "${file/ABC/DEF}";done
https://unix.stackexchange.com/questions/122605/how-do-i-copy-multiple-files-by-wildcard
var
f1="/somedir/a file.png"
︙
f2="/somedir/another file.png"
︙
$ cp "$f1" "$f2" "$f3" … /someotherdir
https://superuser.com/questions/557166/copy-multiple-files-via-cp-from-a-string
cd
$ cd ~
$ cd .
$ cd /
refs
Dockerfile
https://github.com/xgqfrms/nginx-image/blob/main/Dockerfile
FROM ubuntu
MAINTAINER admin@xyqfrms.xyz
RUN apt-get update
RUN apt-get install -y nginx
# COPY index.html app.js /var/www/html
COPY index.html /var/www/html
ENTRYPOINT ["usr/sbin/nginx", "-g", "daemon off;"]
EXPOSE 80
https://github.com/xgqfrms/nginx-image/issues/4#issuecomment-751676953
/usr/share/nginx/html
/var/www/html
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
bash copy multi files的更多相关文章
- -bash: ulimit: open files: cannot modify limit: Operation not permitted
普通用户登录系统报错,提示: -bash: ulimit: open files: cannot modify limit: Operation not permitted. 处理方法: #vi /e ...
- Win7-U盘安装出现"We were unable to copy your files. "
使用Windows 7 USB/DVD Download Tool时,提示We were unable to copy your files. Please check your USB device ...
- API Copy Big FIles
public class ApiCopyFile { private const int FO_COPY = 0x0002; private const int FOF_ALLOWUNDO = 0x0 ...
- Save results to different files when executing multi SQL statements in DB Query Analyzer 7.01
1 About DB Query Analyzer DB Query Analyzer is presented by Master Genfeng,Ma from Chinese Mainl ...
- bash guide
Table of Contents Basic Operations 1.1. File Operations 1.2. Text Operations 1.3. Directory Operatio ...
- man bash
BASH(1) General Commands Manual BASH(1) NAME bash - GNU Bourne-Again SHell SYNOPSIS bash [options] [ ...
- 从源码角度谈谈MySQL "Too many open files"错误的根本原因
"Too many open files"是一个比较常见的错误,不仅仅是在 MySQL 中.只要是在 Linux 中启动的进程,都有可能遇到这个错误. 究其原因,是进程打开的文件描 ...
- bash的配置
Bash的启动文件 启动文件也是一种脚本,不过它是在Bash在启动之初就执行它的.不同的启动方式使用的启动文件也有不同. 1. 作为交互的登录脚本环境“交互的”是指你可以再这个环境下输入命令.而所谓的 ...
- JAVA基础知识之NIO.2——Path,Paths,Files
NIO.2 JDK7对NIO进行了重大改进,主要包含以下两方面 新增Path接口,Paths工具类,Files工具类. 这些接口和工具类对NIO中的功能进行了高度封装,大大简化了文件系统的IO编程. ...
随机推荐
- Soul API 网关源码解析 02
如何读开源项目:对着文档跑demo,对着demo看代码,懂一点就开始试,有问题了问社区. 今日目标: 1.运行examples下面的 http服务 2.学习文档,结合divde插件,发起http请求s ...
- 电脑打不开gitHub的解决方法
电脑打不开gitHub的解决方法 方法:修改本地的hosts文件 因为Github是国外网站,所以经常会遇到打不开的问题,并且有时能打开但是网速好慢 解决这个问题的方法是 : C:\Windows ...
- 找出10000内的素数 CSP
"Problem: To print in ascending order all primes less than 10000. Use an array of processes, SI ...
- 2.kafka架构深入——生产者
一个topic有多个partition,每个partition又有多个副本,在这些副本中又有一个leader和多个follower. 1)分区的原因 (1)方便在集群中扩展,每个Partition可以 ...
- (Oracle)取当前日期的最近工作日
描述:现有一需求,日期表中存放了日期和是否节假日(0-工作日,1-节假日),现在需要取日期表中的最近的工作日.如2017/07/23(周日)最近的工作日应该是2017/07/21(周五). ...
- 等待 Redis 应答 Redis pipeline It's not just a matter of RTT
小结: 1.When pipelining is used, many commands are usually read with a single read() system call, and ...
- JasperReports 取消自动分页/忽略分页
因为需要将合同比价单由PDF文档形式改为HTML页面方式,虽然转换文档类型了,但是发现HTML页面中间到了一定行数就出现了空行把Detail给隔开了.之前总想着怎样消除中间空行,以为是报表top页面边 ...
- POJ2961_kmp
Period Time Limit: 3000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64u Submit Status ...
- Excel 如何使用 函数 实现传说中的 多条件中位数 (MEDIANIFS)?
数据科学交流群,群号:189158789,欢迎各位对数据科学感兴趣的小伙伴的加入! 实际上Excel中根本没有MEDIANIFS,但我们可以通过一些方式进行实现: 比如如下图的需求,需要求这一列中,1 ...
- (31)grep命令详解:查找文件内容
1.grep命令用于不需要列出文件的全部内容,而是从文件中找到包含指定信息的那些行. grep命令能够在一个或多个文件中,搜索某一特定的字符模式(也就是正则表达式),此模式可以是单一的字符.字符串.单 ...