在目录中查找文本
grep -rni "text string" /path/to/directory
# -r 在子目录中执行递归搜索
# -n 显示包含该模式的行号
# -i 忽略文本字符串的大小写
统计某个文件夹中指定类型的文件的总体大小
find . -name "*.png" | xargs du -ck # KB
find . -name "*.png" | xargs du -cm # MB
让假 ASCII 字符的文件名现出原形
export LC_ALL=C
ls -al
# 例:
# a:а c:с d:ԁ e:е
# ...
标签为 linux 的文章:
两种方式:
[upall@server ~]$ command &
[upall@server ~]$ nohup command &
第一种在关掉终端后命令也会跟着退出,第二种在关掉终端后命令不会退出。
在后台执行的进程,其父进程还是当前终端shell的进程,一旦父进程退出,则会发送hangup信号给所有子进程,子进程收到hangup以后也会退出。如果我们要在退出shell的时候继续运行进程,则需要使用nohup忽略hangup信号,nohup就是不挂起的意思( no hang up)。
另外...
说明:
修改 /var/www 中所有目录的权限为755,文件除外。
代码:
find /var/www -type d -print0 | xargs -0 chmod 755
# 以上代码摘自 seamonkey 在这里的回复:
# http://www.linuxsir.org/bbs/thread259958.html
<完>
说明:
wget 是个不错的下载工具,可惜不知道怎么使用断点续传功能(貌似没有这功能)。axel 可以继点续传,喜欢的朋友可以试试。
安装:
[upall@local ~]# wget http://soft.shangpan.com/linux/axel-2.4.tar.gz
[upall@local ~]# tar zxvf axel-2.4.tar.gz
[upall@local ~]# cd axel-2.4
[upall@local ~]# ./configure
[upall@local ~]# make && make install
用法:
[upall@local ~]# axel http://dn/axel...