如何用find命令查找目录中文件大小大于1MB日文件

1
find / -size +1000000c // 使用字节为单位
1
find / -size +2048  -print // 使用 512 字节为单位

字符转换

1
cat file | tr a-z A-Z // 小写转大写

Linux下替换文件名中的空格

1
2
3
4
5
6
7
find . -type f -name "* *" -print |
while read name; do
na=$(echo $name | tr ' ' '_')
if [[ $name != $na ]]; then
mv "$name" $na
fi
done

制作补丁

1
diff -uN from-file to-file >to-file.patch

打补丁

1
patch -p0 < to-file.patch

取消补丁

1
patch -RE -p0 < to-file.patch
 

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.