Linux sed 和 awk 的用法sedsed [-nefri] [操作] 常用选项:-n∶使用安静(silent)模式。在一般 sed 的用法中,所有来自 STDIN的资料一般都会被列出到萤幕上。但如果加上 -n 参数后,则只有经过sed 特殊处理的那一行(或者动作)才会被列出来。-e∶直接在指令列模式上进行 sed 的动作编辑;-f∶直接将 sed 的动作写在一个档案内, -f filename 则可以执行 filename 内的sed 动作;-r∶sed 的动作支援的是延伸型正规表示法的语法。(预设是基础正规表示法语法)-i∶直接修改读取的档案内容,而不是由萤幕输出。常用命令:a ∶新增, a 的后面可以接字串,而这些字串会在新的一行出现(目前的下一行)~c ∶取代, c 的后面可以接字串,这些字串可以取代 n1,n2 之间的行!d ∶删除,因为是删除啊,所以 d 后面通常不接任何咚咚;i ∶插入, i 的后面可以接字串,而这些字串会在新的一行出现(目前的上一行);p ∶列印,亦即将某个选择的资料印出。通常 p 会与参数 sed -n 一起运作
使用 split 命令拆分文件split -C 100M large_file.txt stxt # 拆分文件large_file.txt, 每个100M, 前缀是stxt。 使用cat命令合并文件cat stxt* > new_file.txt # 将所有匹配到的文件合并。 cat file1 file2 > file # 合并file1,file2 到文件file。 引用Linux中split大文件分割和cat合并文件详解
find . | grep 文件名
踩的坑 第三步,配置云服务器的安全组的端口,放行 FTP 协议默认端口 21 和 FTP 被动端口范围 39000-40000参考链接如何指定FTP被动模式下数据传输端口的选择
chown -R www:www public/
风里来
最后,我终于解放了我自己……