shell脚本,计算创建100个文件所用多少时间。
[root@localhost mulu]# ls
[root@localhost mulu]# time for i in `seq `; do touch file$i; done real 0m0.104s
user 0m0.012s
sys 0m0.090s
[root@localhost mulu]# ls
file1 file13 file18 file22 file27 file31 file36 file40 file45 file5 file54 file59 file63 file68 file72 file77 file81 file86 file90 file95
file10 file14 file19 file23 file28 file32 file37 file41 file46 file50 file55 file6 file64 file69 file73 file78 file82 file87 file91 file96
file100 file15 file2 file24 file29 file33 file38 file42 file47 file51 file56 file60 file65 file7 file74 file79 file83 file88 file92 file97
file11 file16 file20 file25 file3 file34 file39 file43 file48 file52 file57 file61 file66 file70 file75 file8 file84 file89 file93 file98
file12 file17 file21 file26 file30 file35 file4 file44 file49 file53 file58 file62 file67 file71 file76 file80 file85 file9 file94 file99
[root@localhost mulu]# rm -rf file*
[root@localhost mulu]# ls
[root@localhost mulu]# time touch file{..} real 0m0.010s
user 0m0.000s
sys 0m0.009s
[root@localhost mulu]# ls
file1 file13 file18 file22 file27 file31 file36 file40 file45 file5 file54 file59 file63 file68 file72 file77 file81 file86 file90 file95
file10 file14 file19 file23 file28 file32 file37 file41 file46 file50 file55 file6 file64 file69 file73 file78 file82 file87 file91 file96
file100 file15 file2 file24 file29 file33 file38 file42 file47 file51 file56 file60 file65 file7 file74 file79 file83 file88 file92 file97
file11 file16 file20 file25 file3 file34 file39 file43 file48 file52 file57 file61 file66 file70 file75 file8 file84 file89 file93 file98
file12 file17 file21 file26 file30 file35 file4 file44 file49 file53 file58 file62 file67 file71 file76 file80 file85 file9 file94 file99
[root@localhost mulu]#
shell脚本,计算创建100个文件所用多少时间。的更多相关文章
- shell脚本,创建50个文件,删除50个文件。
[root@localhost ~]# cat create50.sh #!/bin/bash #创建50个文件 ` do touch student$i done echo "创建50个文 ...
- 详解Linux交互式shell脚本中创建对话框实例教程_linux服务器
本教程我们通过实现来讲讲Linux交互式shell脚本中创建各种各样对话框,对话框在Linux中可以友好的提示操作者,感兴趣的朋友可以参考学习一下. 当你在终端环境下安装新的软件时,你可以经常看到信息 ...
- shell练习(1)创建100个用户
shell练习(1)创建100个用户 默默努力的小白. 2020-04-15 16:28:49 49 收藏文章标签: linuxshell版权随机创建100个用户,并生成随机密码,并将密码放入一个文件 ...
- Linux shell脚本 批量创建多个用户
Linux shell脚本 批量创建多个用户 #!/bin/bash groupadd charlesgroup for username in charles1 charles2 charles3 ...
- Shell 脚本批量创建数据库表
使用 Shell 脚本批量创建数据表 系统:Centos6.5 64位 MySQL版本:5.1.73 比如下面这个脚本: #!/bin/bash #批量新建数据表 for y in {0..199}; ...
- Shell脚本调用ftp上传文件
Shell脚本调用ftp上传文件 1.脚本如下 ftp -n<<! open x.x.x.x ###x.x.x.x为ftp地址 user username password ###user ...
- shell脚本计算Linux网卡流量
本文介绍了计算linux网卡流量的一个shell脚本,一个通过固定间隔时间获取ifconfig eth0 的字节值而计算出网卡流量的方法,有需要的朋友参考下. 使用shell脚本计算Linux网卡流量 ...
- shell脚本:通过域名获取证书的过期时间
需要两个文件,一个用于存储域名信息,另一个是检测脚本 注意:这两个文件是在一个目录下 domain_ssl.info [存储域名信息] [root@mini05 ]# cat domain_ssl.i ...
- SQL Server 中执行Shell脚本计算本地文件的内容大小
SQL Server 数据库中除了能执行基本的SQL语句外,也可以执行Shell脚本.默认安装后,SQL中的Shell脚本的功能是关闭的,需要手动打开, 执行以下脚本即可打开该功能. -- 允许配置高 ...
随机推荐
- std::thread 在DLLMain 中会发生死锁 std::thread cause deadlock in DLLMain
注意不要再DLLMain中使用 std::thread 否则会发生死锁. 但是可以使用 _beginthreadex (此函数可以使用lambda) 或者直接使用windows的底层函数: Creat ...
- NSString 是否存在空格
NSString *_string = [NSString stringWithFormat:@"123 456"]; NSRange _range = [_string rang ...
- bzoj2502清理雪道
传送门 好题啊,由于每个点既可以进,也可以出,就可以新建一个源点和汇点,对于每个点都连边,然后就是最小流板子了. 代码: #include<cstdio> #include<iost ...
- 51 Nod 1640 天气晴朗的魔法( Kruskall )
#include <bits/stdc++.h> typedef long long LL; using namespace std; ; struct node{ LL u,v,w; n ...
- vs 对网站和项目使用IIS Express 的64位版
- 101 to 010 Atcoder CODE FESTIVAL 2017 qual B D
https://www.luogu.org/problemnew/show/AT3575 题解 根本不会.. 错误记录:缺少32行的转移.显然这个转移是必要的 #include<cstdio&g ...
- Springboot日志配置探索(主要看logback)(一)
这篇博客是springboot日志配置探索的第一篇,主要讲默认配置下springboot的logback日志框架的配置(即直接使用是怎样的) 首先,是一个SpringBoot的有关日志的说明文档:ht ...
- C51 笔记
一 关于宏常量的长度:C51中定义一个常数宏(默认是16位的),如果用宏表示一个32位的宏而不加'L'标志的话就会出错.如 #define BLOCK_A_BASEADDR 18*64*1024 / ...
- Redis特点
内存存储,速度极快. 支持的数据类型多,相比较其他的Nosql. 键:字符串 值的六种数据结构:字符串,列表,散列,集合,有序集合,HyperLogLog 附加功能强大
- solr亿万级索引优化实践-自动生成UUID
solr亿万级索引优化实践(三) 原创 2017年03月14日 17:03:09 本篇文章主要介绍下如何从客户端solrJ以及服务端参数配置的角度来提升索引速度. solrJ6.0提供的 ...