#!/bin/bash FILE_NAME="testfile" FILE_SIZE=("100k" "200k" "300k") for f_size in "${FILE_SIZE[@]}"; do dd if=/dev/zero of="./sdb1/"$FILE_NAME"_"$f_size".ssf" bs=$f_size count=1 dd if=/dev/zero of="./sdb2/"$FILE_NAME"_"$f_size".mdb" bs="1024" count=1 dd if=/dev/zero of="./sdb2/"$FILE_NAME"_"$f_size".eve" bs="1024" count=1 dd if=/dev/zero of="./sdb2/"$FILE_NAME"_"$f_size".db2" bs="1024" count=1 done |
#!/bin/bash # (1) mount hdd(partition) #MOUNT_HDD={"sda" "sdb" "sdc" "sdd" "sde" "sdf" "sdg" "sdi"} ROOT_DEL_DIR=/ DEL_FILE_SIZE=+100k target_files="$(find $ROOT_DEL_DIR -name *.ssf -size $DEL_FILE_SIZE)" for target_file in ${target_files[@]}; do target_file_name=$(basename -s ".ssf" $target_file) del_files=$(find $ROOT_DEL_DIR -name *$target_file_name*) for del_file in ${del_files[@]}; do rm -f $del_file; echo "DEL: "$del_file; done done |
'Programming' 카테고리의 다른 글
git commit message guideline (0) | 2019.01.07 |
---|---|
cJSON Programming (0) | 2015.11.29 |
scons 개념 및 사용법 (1) | 2015.04.08 |
DHCP Probe 소스 코드 (0) | 2014.11.29 |
현재 네트워크에서 DHCP 서버가 동작되고 있는지 확인? (0) | 2014.08.18 |