$ dd if=/dev/zero of=junk.data bs=1M count=1 参数: if (input file) of (output file) bs(block size) count(需要复制的块数) bs 单位(c w B K M G) /dev/zero 特殊的字符设备,返回0值字节(\0)…
/* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://w…
SQL Server 数据库中除了能执行基本的SQL语句外,也可以执行Shell脚本.默认安装后,SQL中的Shell脚本的功能是关闭的,需要手动打开, 执行以下脚本即可打开该功能. -- 允许配置高级选项(1:允许 0:禁止) GO -- 重新配置 RECONFIGURE GO -- 启用xp_cmdshell(1:启用 0:禁用) GO --重新配置 RECONFIGURE GO 在本地系统C盘根目录下常见一个测试文件,123.txt,内容为:你好,我好,大家好. 在SQL Server查询…
一.生成任意大小的文件(dd命令): 举例: amosli@amosli-pc:~/learn/example$ ; + records in + records out bytes ( MB/s amosli@amosli-pc:~/learn/example$ ls test.zip dd命令介绍:创建特定大小的文件最简单的方法就是使用dd命令,dd命令会克隆给定的输入内容然后将一模一样的一份副本写入到输出.stdin,设备文件,普通文件都可以作为输入,stdout,设备文件,普通文件等都可…
遇到的问题:进行了目录的字符串大小比较,结果在目录下生成了很多的新文件 解决方法:在>和<的比较符号前增加\转义 代码如下: #/usr/bin/bash cd /opt/scf/service/deploy/zztradelogic/lib list=`ls` for file in $list do eval $(ls|grep $file |awk -F"-" '{printf("name=%s;version=%s;jarname1=%…