03 2019 档案
摘要:diff patch -p1 diff -Naur directory1 directory2
阅读全文
摘要:cat /dev/cdrom > image.iso dd if=/dev/cdrom of=image.iso mkisofs -V "Label" -o image.iso source_dir/ isohybrid isohybrid image.iso dd if=image.iso of=
阅读全文
摘要:#!/bin/bash #file name : filestat.sh if [ $# -ne 1 ]; then echo "Usage is $0 basepath"; exit fi path=$1 declare -A statarray; while read line; do ftype=`file -b "$line" | cut -d, -f1` ...
阅读全文
摘要:Panel is deprecated and will be removed in a future version.The recommended way to represent these types of 3-dimensional data are with a MultiIndex o
阅读全文
摘要:#!/bin/bash #查找并删除重复文件,每个文件只保留1份 ls -LS --time-style=long-iso | awk 'BEGIN { getline; getline; name1=$8; size=$5 } { name2=$8 if(size==$5) { "md5sum "
阅读全文
摘要:$ 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 特殊的字符设备,返
阅读全文
摘要:-exec 创建子shell $ find . -exec sh -c 'echo -n {} | tr -d "[:alnum:]_.\-" | \ tr "/" " "; basename {}' \; 文件汇总信息 for d in `find . -type d`; do echo `fin
阅读全文
摘要:rename #find path -type f -name "*.mp3" -exec mv { } target_dir \; #mp3 file mv dir_file #digui #find path -type f -exec rename 's/ /_/g' {} \; # 检查给的
阅读全文
摘要:rename find mv #实现查找png 和 jpeg文件 #!/bin/bash #file name: rename.sh #use: rename.jpg and .png files count=1; for img in `find . -iname '*.png' -o -inam
阅读全文
摘要:1) sort file1.txt file2.txt > sorted.txt sort file1.txt file2.txt -o sorted.txt 2)sort -n file.txt #按照数字排序 3)sort -r file.txt #按照逆序排序 4)sort -M months
阅读全文
摘要:tr echo 12345 | tr '0-9' '9876543210' echo 87654 | tr '9876543210' '0-9' ROT13 echo "tr came, tr saw, tr conquered." | tr 'a-zA-Z' 'n-za-mN-ZA-M' echo
阅读全文
摘要:shebang = sharp-bang = #! 1.echo $PATH export PATH="$PATH:/home/user/bin" PREPEND prepend() { [ -d "$2" ] && eval $1=\"$2':'\$$1\" && export $1; } 2.e
阅读全文